Considering we’re using Tesla & hackney - is there a quick & elegant way of discriminating between {:error, :timeout} that is a TCP connect timeout, versus other reasons of timeout?
What team and myself are currently considering is:
- write own
Tesla.Middleware.Timeoutwith a special:error, :middleware_timeout - write own
hackneyadapter for tesla, which would use GitHub - benoitc/hackney: simple HTTP client in Erlang · GitHub when making requests and discriminate between:request_timeoutandconnect_timeoutusing this - fork
hackneyand modify there and depend on a forked version
None of these options is really appealing at the moment. (the middleware_timeout is easy to pull off, but doesn’t provide full discrimination).






















