MCPcopy Create free account
hub / github.com/fastify/fastify / defaultErrorHandler

Function defaultErrorHandler

lib/error-handler.js:78–83  ·  view source on GitHub ↗
(error, request, reply)

Source from the content-addressed store, hash-verified

76}
77
78function defaultErrorHandler (error, request, reply) {
79 setErrorHeaders(error, reply)
80 setErrorStatusCode(reply, error)
81 request.server[kLogController].defaultErrorLog(error, request, reply)
82 reply.send(error)
83}
84
85function fallbackErrorHandler (error, reply, cb) {
86 const res = reply.raw

Callers

nothing calls this directly

Calls 4

setErrorHeadersFunction · 0.85
setErrorStatusCodeFunction · 0.85
defaultErrorLogMethod · 0.80
sendMethod · 0.80

Tested by

no test coverage detected