New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Promise support #2323
Comments
Maybe the catch shouldn't be there in the first place, unless onDone has a chance to fail and can recover with a second call to itself. |
I have no clue. I don't use promises. I'll let @Marsup make the call on this one. |
@hueniverse Is the last part of my sentence possible? |
I can't see a way that it would throw such that a second call would resolve it |
Then just removing the catch part should do it. |
Adds compatibility for promises that implement the bare A+ spec Closes hapijs#2323
Fix ready to merge in #2324. I don't think it merits a test but I can't certainly add one if desired. |
Adds compatibility for promises that implement the bare A+ spec Closes hapijs#2323
Would it be appropriate to change this line in
response.js
from:this.source.then(onDone, onDone).catch(onDone);
to
this.source.then(onDone, onDone).then(null, onDone);
The reason for this is that some promise implementations still don't have
catch
implemented.A major example is Mongoose/mpromise.
Open to discussion.
The text was updated successfully, but these errors were encountered: