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

Method serializerError

lib/log-controller.js:151–155  ·  view source on GitHub ↗

* Logs an error when the serializer for a given status code fails. * * @param {Error} error The serialization error. * @param {object} request Fastify request object. * @param {object} reply Fastify reply object. * @param {object} metadata Extra contextual data

(error, request, reply, metadata)

Source from the content-addressed store, hash-verified

149 * @param {number} metadata.statusCode The status code that triggered the serializer.
150 */
151 serializerError (error, request, reply, metadata) {
152 if (this.isLogDisabled(request)) { return }
153
154 reply.log.error({ err: error, statusCode: metadata.statusCode }, 'The serializer for the given status code failed')
155 }
156
157 /**
158 * Logs a 503 Service Unavailable when the server is closing.

Callers 2

fallbackErrorHandlerFunction · 0.80
logger.test.jsFile · 0.80

Calls 2

isLogDisabledMethod · 0.95
errorMethod · 0.80

Tested by

no test coverage detected