Skip to content
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

add expectations for numeric status codes #135

Closed
wants to merge 1 commit into from
Closed

add expectations for numeric status codes #135

wants to merge 1 commit into from

Conversation

wheresrhys
Copy link
Contributor

This implements another bit of conformance with the Response spec. https://fetch.spec.whatwg.org/#dom-response.

@coveralls
Copy link

coveralls commented Jul 21, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling f750b64 on wheresrhys:numeric-status into 952aa2a on bitinn:master.

@bitinn
Copy link
Collaborator

bitinn commented Sep 11, 2016

I decide to close this PR, I know you are doing the right thing, but also note that status is not completely under developer control, as underlying Node.js http.request might not normalize the status code between 200-599...

It makes sense for us to throw RangeError on new Response() (programming error), but not quite right to reject with RangeError when response is outside of 200-599 range (not a programming error, which should use custom FetchError)...

Anyway. thx for pointing this out :)

@bitinn bitinn closed this Sep 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants