-
Notifications
You must be signed in to change notification settings - Fork 165
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
Handle conversion failures in 'upon settling'. #791
base: main
Are you sure you want to change the base?
Conversation
And then, if <a lt="an exception was thrown">an exception |exception| was thrown</a>: | ||
|
||
1. If there are steps that are required to be run if the promise was rejected, let | ||
|result| be the result of performing those steps, given |exception|. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|result| is unused. Should it be returned, instead of throwing exception?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, good question. This matters if:
- we want to do a type conversion
- the returned promise is used (former "transforming")
- we want to do something else than passing the rejection along
Are you aware of an existing case to inform the decision? From #782 (comment), waitUntil
/complete
fail (1), respondWith
/updateWith
fail (2), WebAssembly fails (3).
Writing this, I'm realizing that we never actually pass the rejection along, the way WebAssembly needs. Should we pass undefined instead of onRejectedSteps
if there's no steps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you aware of an existing case to inform the decision?
I'm not aware of any. However I generally think aligning with promise.then() will be more intuitive for spec authors, if we have that degree of freedom. So I'd prefer that if possible.
Writing this, I'm realizing that we never actually pass the rejection along, the way WebAssembly needs. Should we pass undefined instead of onRejectedSteps if there's no steps?
Definitely.
@Ms2ger do you plan to complete this? |
Probably not. |
Fixes #782.
Preview | Diff