fix server not propagating errors on prehandler(promise) + handler error (#3242) #3358
This patch proposes a fix for #3242 ;
The fix revolves around explicit domain bindings and execution of promise handler from the event loop (using process.nextTick) so that the error is not swallowed up by the promise itself (which was basically leading to a deadlock; the promise never fully resolved, and the callback is never called )
This is technically a bugfix, and I wasn't sure if I'm supposed to increase the patch version number, so I'll leave it up to you guys.
The text was updated successfully, but these errors were encountered:
This commit fixes hapijs#3242; The fix basically revolves around running the promise handler on the nextTick, so that it would propogate upwards, but also explicitly binding a domain to a handler up in the chain of propogation, so that it's handled properly.