-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Unhandled error in deflate compression handling #45
Comments
Ah. Just curled that url. A redirect? Not supported in this library? |
How do I handle this error? And is it possible to follow the redirect using |
Yep, https://github.com/bitinn/node-fetch/blob/master/index.js#L141 As we do test for deflate response support, my guess would be that particular server is returning something weird. https://github.com/bitinn/node-fetch/blob/master/test/server.js#L67-L74 As a workaround for now, setting options Neverthless, I think in this case we need to handle this error so that |
Thanks for your reply.
Yeah I think so too. As it is now I seem to have no way to handle the error, and I would prefer receive an Error rather than changing the compression mode (I'm making many requests).
|
@pocketjoso I plan to work on this module next week, will update when the fix has landed. |
Awesome. :) |
Fixed in v1.3.3, just note that we can't reject the fetch request (because the error is on body, which is a stream) but we do reject it when you call Otherwise you can use |
Excellent, thanks for fixing! |
Okay, I have to admit that I have no idea what's going on here, sorry for the vague issue.
Node
v0.12.7
gives
...
The fetch results in a
ok
response... The promise is not rejected. But I still get this error thrown, somewhere.. Confused. :/The text was updated successfully, but these errors were encountered: