node-epimetheus
node-epimetheus copied to clipboard
Cannot read property 'statusCode' of null
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?
Happy to take a pull request on this. Please follow these guidelines if you do