node-epimetheus icon indicating copy to clipboard operation
node-epimetheus copied to clipboard

Cannot read property 'statusCode' of null

Open Elexy opened this issue 8 years ago • 1 comments

From time to time we see this error in our logs:

Debug: internal, implementation, error 
    TypeError: Cannot read property 'statusCode' of null
    at server.on (..../node_modules/epimetheus/lib/hapi.js:23:74)

As this happens intermittently I am suspecting this happens when the client closed the connection prematurely. The Hapi docs state:

response - the response object when set. The object can be modified but must not be assigned another object. To replace the response with another from within an extension point, use reply(response) to override with a different response. Contains null when no response has been set (e.g. when a request terminates prematurely when the client disconnects).

Is it possible to account for null responses?

Elexy avatar Sep 15 '17 10:09 Elexy

Happy to take a pull request on this. Please follow these guidelines if you do

roylines avatar Aug 21 '18 16:08 roylines