Closed
Description
I'm implementing a feature where I'm sending chunks of a CSV file from a stream
and currently, I'm using Enum.into
to traverse the stream into the connection.
I'm getting an error when the connection is closed on the client side:
** (MatchError) no match of right hand side value: {:error, :closed}
(plug) lib/plug/conn.ex:1239: anonymous fn/2 in Collectable.Plug.Conn.into/1
Looking into the Plug.Conn implementation of the Collectable protocol explains the error because there's only a match when things go well.
I was wondering what would be the best approach to handle the case when the connection is closed by the client.
Metadata
Metadata
Assignees
Labels
No labels