MCPcopy Create free account
hub / github.com/TanStack/db / handleRejection

Function handleRejection

packages/db/tests/utils.ts:439–446  ·  view source on GitHub ↗
(reason: any)

Source from the content-addressed store, hash-verified

437
438 let expectedRejectionCaught = false
439 const handleRejection = (reason: any) => {
440 if (reason?.message === expectedMessage) {
441 expectedRejectionCaught = true
442 return // Don't re-throw, this is expected
443 }
444 // Re-throw other rejections
445 reject(reason)
446 }
447
448 if (originalUnhandledRejection) {
449 process.removeListener(`unhandledRejection`, originalUnhandledRejection)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected