Skip to content

Reject promise with TypeError for network failures. - #36

Merged
dgraham merged 1 commit into
masterfrom
reject-with-error
Nov 21, 2014
Merged

dgraham merged 1 commit into
masterfrom
reject-with-error

Conversation

@dgraham

@dgraham dgraham commented Nov 21, 2014

Copy link
Copy Markdown
Contributor

Section 5.6 Fetch method of the specification says:

To process response for response, run these substeps:

  1. If response's type is error, reject p with a TypeError.
  2. Otherwise, resolve p with new Response object associated with response.

This branch brings the implementation in line with step one of the response handling. Previously, we rejected the Promise without a reason object when the network request failed to produce a response. Now we reject with a TypeError for any registered catch handlers to process.

@annevk Is this a correct understanding of this section of the spec?

@josh

josh commented Nov 21, 2014

Copy link
Copy Markdown
Contributor

✨

dgraham added a commit that referenced this pull request Nov 21, 2014
Reject promise with TypeError for network failures.
@dgraham
dgraham merged commit e184d6e into master Nov 21, 2014
@dgraham
dgraham deleted the reject-with-error branch November 21, 2014 18:06
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Oct 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants