We were getting an error in production that looks like:
(CaseClauseError no case clause matching: {:error, "got FunctionClauseError with message \"no function clause matching in Mint.HTTP1.format_error/1\" while retrieving Exception.message/1 for %Mint.HTTPError{module: Mint.HTTP1, reason: %Mint.TransportError{reason: :einval}}"})
We were getting an error in production that looks like:
It turns out
einval
error is not being handled by Mint here https://github.com/elixir-mint/mint/blob/dd7c7b46f012fef177e761d3cea1e1cf6f5a9795/lib/mint/http1.ex#L964. I thinkeinval
may have come fromgen_tcp
. Would be great to handle this error and all possible errors in format_error/1.