MCPcopy
hub / github.com/fastify/fastify / onErrorHook

Function onErrorHook

lib/reply.js:930–943  ·  view source on GitHub ↗
(reply, error, cb)

Source from the content-addressed store, hash-verified

928}
929
930function onErrorHook (reply, error, cb) {
931 if (reply[kRouteContext].onError !== null && !reply[kReplyNextErrorHandler]) {
932 reply[kReplyIsRunningOnErrorHook] = true
933 onSendHookRunner(
934 reply[kRouteContext].onError,
935 reply.request,
936 reply,
937 error,
938 () => handleError(reply, error, cb)
939 )
940 } else {
941 handleError(reply, error, cb)
942 }
943}
944
945function setupResponseListeners (reply) {
946 reply[kReplyStartTime] = now()

Callers 5

reply.jsFile · 0.85
preSerializationHookEndFunction · 0.85
wrapOnSendEndFunction · 0.85
onReadErrorFunction · 0.85
sendStreamFunction · 0.85

Calls 2

onSendHookRunnerFunction · 0.85
handleErrorFunction · 0.85

Tested by

no test coverage detected