diff --git a/api/src/plugins/not-found.ts b/api/src/plugins/not-found.ts index c5a636c948b..152646da902 100644 --- a/api/src/plugins/not-found.ts +++ b/api/src/plugins/not-found.ts @@ -15,7 +15,7 @@ const fourOhFour: FastifyPluginCallback = (fastify, _options, done) => { // If the request accepts JSON and does not specifically prefer text/html, // this will return a 404 JSON response. Everything else will be redirected. fastify.setNotFoundHandler((req, reply) => { - const logger = fastify.log.child({}); + const logger = fastify.log.child({ req }); logger.info('User requested path that does not exist'); const accepted = req.accepts().type(['json', 'html']);