We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I believe it's an anti-pattern to synchronously throw errors in promises.
Example:
var mightBeFalse = false; got(mightBeFalse) .then(doStuff) .catch(handleRejectedPromise);
got synchronously throws
got
throws
Parameter `url` must be a string or object, not boolean
Instead of rejecting the promise which would be handled by handleRejectedPromises.
handleRejectedPromises
The text was updated successfully, but these errors were encountered:
workaround throwing in promise mode
738a2a8
Fixes #99
@dylang yeah, errors in Promise API should be returned as rejected promises. Good catch 👍
Sorry, something went wrong.
0109725
Thanks @floatdrop!
No branches or pull requests
I believe it's an anti-pattern to synchronously throw errors in promises.
Example:
got
synchronouslythrows
Instead of rejecting the promise which would be handled by
handleRejectedPromises
.The text was updated successfully, but these errors were encountered: