Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Error tag incorrectly set (node 11) #3898
All requests, including with the
Are you sure this is an issue with the hapi core module or are you just looking for some help?
Yes, I believe so.
Is this a security related issue?
What are you trying to achieve or the steps to reproduce?
Using the following example: https://gist.github.com/mfanto/9ffac7d26a26cd1649c9ff6810be9d73
What was the result you received?
The error tag is set to true, both through debugging turned on, as well as the server
What did you expect?
The error tag to not be set.
I think the problem is with this line:
Regardless if err is truthy or not, it always sets the
I can confirm also on hapi v17.7.0 and node v11.2.0 with a simple curl request. I can also confirm that the issue does not occur on node v10.12.0 with the same hapi version. I recall some timer issues in node v11 that @cjihrig experienced and reviewed (i.e. nodejs/node#24322). While those bugs were fixed in v11.2.0, perhaps there's something else going on in a similar vein.
I don't think this is related to the timers issues (knocks on wood).
nodejs/node#20611 landed in Node 10.2.0. If you run the example against Node 10.2.0, you'll see the same output as you see on Node 11. That commit was determined to be a breaking change, and reverted in Node 10.8.0 in nodejs/node#21809, which is when the behavior goes back to what we expect.
nodejs/node#20611 was then re-released in Node 11, which is why we see the different behavior. I think hapi will probably want to update to deal with this.