* 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)
| 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. |
no test coverage detected