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

Function buildErrorHandler

lib/error-handler.js:124–132  ·  view source on GitHub ↗
(parent = rootErrorHandler, func)

Source from the content-addressed store, hash-verified

122}
123
124function buildErrorHandler (parent = rootErrorHandler, func) {
125 if (!func) {
126 return parent
127 }
128
129 const errorHandler = Object.create(parent)
130 errorHandler.func = func
131 return errorHandler
132}
133
134function setErrorHeaders (error, reply) {
135 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