-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the bug has not already been reported
Fastify version
4.6.0
Plugin version
No response
Node.js version
20.11.1
Operating system
macOS
Operating system version (i.e. 20.04, 11.3, 10)
14.5
Description
Hello, I want to log the duration of a request using a custom serializers. While doing so, I encoutered the following error :
const fastify = Fastify({
logger: {
serializers: {
res(reply) {
console.log(reply.request); // undefined
},
},
},
});When an user aborts a request, reply.request is empty.
This line should be logStreamError(reply.log, err, reply).
Link to code that reproduces the bug
No response
Expected Behavior
reply.request should be correctly populated
Reactions are currently unavailable