MCPcopy Create free account
hub / github.com/TanStack/query / onError

Function onError

packages/query-core/src/__tests__/mutationCache.test.tsx:69–73  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

67 const key = queryKey()
68 const states: Array<number> = []
69 const onError = () =>
70 sleep(10).then(() => {
71 states.push(1)
72 states.push(2)
73 })
74 const onSettled = () =>
75 sleep(10).then(() => {
76 states.push(5)

Callers 2

withPersistQueryClientFunction · 0.85
asyncThrottleFunction · 0.85

Calls 1

sleepFunction · 0.90

Tested by

no test coverage detected