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

Gun: streaming response body breaks with Tesla.Middleware.Timeout #709

Open
feld opened this issue Aug 28, 2024 · 1 comment
Open

Gun: streaming response body breaks with Tesla.Middleware.Timeout #709

feld opened this issue Aug 28, 2024 · 1 comment

Comments

@feld
Copy link

feld commented Aug 28, 2024

The Timeout middleware breaks the ability to read the stream and an error is thrown due to no case clause matching

** (CaseClauseError) no case clause matching: {:error, :recv_chunk_timeout}
    (tesla 1.11.0) lib/tesla/adapter/gun.ex:493: anonymous fn/2 in Tesla.Adapter.Gun.format_response/6
    (elixir 1.16.3) lib/stream.ex:1626: Stream.do_resource/5
    (elixir 1.16.3) lib/enum.ex:1560: Enum.reduce_into_protocol/3
    (elixir 1.16.3) lib/enum.ex:1544: Enum.into_protocol/2
    iex:4: (file)

Observed with Tesla 1.11.0

@yordis
Copy link
Member

yordis commented Oct 25, 2024

Hey @feld do you have a code snippet I could use to replicate this? I am gonna give it a try

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

No branches or pull requests

2 participants