Closed pingvinen closed 7 years ago
This seems to be related to (or triggered by) the handler.defaults
setting the payload to a stream. Bypassing it or changing it to data
, makes the logging work, but makes parsePayload
resolve with an empty object, triggering a validation error.
Tried adding an endpoint to my test project, where I change the payload to be a stream. This messes up the logging as well, so I guess this is actually an issue for the logging part of Hapijs.
I have run into a weird issue, and I am hoping that someone can help me figure it out.
Minimal project showing the issue
For debugging purposes, I am running hapi with good logging where I am including logs of response events including the request payload. This works just fine except when used in combination with hapi-graphql, where
request.payload
is mapped to theIncomingMessage
instance, which has a lot of circular references meaning that the server can end up in an infinite loop killing the poor node process handling it.