MCPcopy
hub / github.com/fastify/fastify / buildErrorHandler

Function buildErrorHandler

lib/error-handler.js:143–151  ·  lib/error-handler.js::buildErrorHandler
(parent = rootErrorHandler, func)

Source from the content-addressed store, hash-verified

141}
142
143function buildErrorHandler (parent = rootErrorHandler, func) {
144 if (!func) {
145 return parent
146 }
147
148 const errorHandler = Object.create(parent)
149 errorHandler.func = func
150 return errorHandler
151}
152
153function setErrorHeaders (error, reply) {
154 const res = reply.raw

Callers 4

fastifyFunction · 0.85
setErrorHandlerFunction · 0.85
_setNotFoundHandlerFunction · 0.85
addNewRouteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected