Open rimassa opened 9 years ago
Hey @rimassa thanks for all the detail! You def shouldn't get unhandled rejection warnings under normal circumstances unless there's actually a rejected promise escaping somewhere. I'll dig into your example this weekend and hopefully we can figure out what's going on.
@rimassa Here's a gist of a simplified version of your example. I've run it in node 0.12 and iojs 2.0, and haven't been able to reproduce the issue. The result I get only has the logger.error
output, and doesn't report an unhandled rejection.
Could you try that gist and see what you get? What version of node/iojs are you using? Maybe there is some environment difference, or maybe it has something to do with express
being in the mix (although it's not clear to me how that would affect it).
Do you have any more info that might help us track this down?
Thanks!
Hello!
I am using promise aware AOP plugin from wire.js to log messages before and after promise are resolved/rejected. This is a simple example of what I am attempting to do:
Once I started this server, when I request the following route:
I get the following messages logged on server:
Should I worry about that Potentially unhandled rejection [11] message, even if it never reports the related message "Handled previous rejection" for that rejection, from then on?
And, surprisingly (at least to me) is that if I comment the following lines from the script above:
and repeat the test, I no longer get the message about the potentially unhandled rejection. Thus, it seems that this message appears only when both "afterFulfilling" and "afterRejecting" advices are used together on a function.
I'm using the following node.js and module versions: "express": "^4.12.3", "wire": "^0.10.10" "when": "^3.7.3" node v0.12.0
Thanks in advance Ricardo