TypeError: Cannot read properties of undefined (reading 'reply')
at defaultErrorFormatter (/app/node_modules/mercurius/lib/errors.js:67:19)
at Object.<anonymous> (/app/node_modules/mercurius/lib/routes.js:139:40)
at handleError (/app/node_modules/fastify/lib/reply.js:555:20)
at onErrorHook (/app/node_modules/fastify/lib/reply.js:524:5)
at _Reply.Reply.send (/app/node_modules/fastify/lib/reply.js:128:5)
at done (/app/node_modules/fastify/lib/contentTypeParser.js:167:13)
at Parser.defaultJsonParser [as fn] (/app/node_modules/fastify/lib/contentTypeParser.js:262:14)
at IncomingMessage.onEnd (/app/node_modules/fastify/lib/contentTypeParser.js:243:27)
at AsyncResource.runInAsyncScope (node:async_hooks:199:9)
at IncomingMessage.emit (node:events:402:35)
This can happen if an error is thrown in a hook. We should be adding back the check for Context in the error handler.
In production it's possible to see:
This can happen if an error is thrown in a hook. We should be adding back the check for Context in the error handler.
Originally posted by @SimenB in #653 (comment)
The text was updated successfully, but these errors were encountered: