-
Notifications
You must be signed in to change notification settings - Fork 350
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
Mint reduce_responses doesn't handle all possible responses #450
Comments
@sezaru Thanks for reporting this. Would you be able to provide a PR to fix this? |
Hello everyone. To be honest, I'm somewhat lost on how to properly fix this but I would be happy to provide a PR handling those 3 cases if you're willing to enlighten me a bit. For now, I managed to get our project working with the patch you can see on this branch. Your test suite still pass, but I'm not certain if this is how things were supposed to be done, that's why I didn't open a PR (and because I'm only handling one of the 3 missing cases right now). Thanks for your effort on this library and let me know if there is anything else I can help with. |
@crova Could you open a PR against current tesla master with the necessary changes? |
Sure @teamon , the same one I linked above? |
Yes, with the patch that fixes the issue :) |
I'll open it by tomorrow. |
…educe-response-doesnt-handle-all-possible-responses
…educe-response-doesnt-handle-all-possible-responses
Mint's adapter
reduce_responses/3
https://github.com/teamon/tesla/blob/cc18e12226ef5b61f19daf7cc85cb8f94ae428b1/lib/tesla/adapter/mint.ex#L327-L340 doesn't handle all possible returnsHTTP.stream/2
can return.The returns missing are:
{:error, request_ref(), reason :: term()}
{:pong, request_ref()}
{:push_promise, request_ref(), promised_request_ref :: request_ref(), headers()}
The last two are just for HTTP2 streams.
More information here: https://hexdocs.pm/mint/1.2.1/Mint.Types.html#t:response/0
The text was updated successfully, but these errors were encountered: