Observed log:
** (Mint.HTTPError) expected tunnel proxy to return a status between 200 and 299, got: 407
Mint source code:
|
"expected tunnel proxy to return a status between 200 and 299, got: #{inspect(status)}" |
From MDN HTTP 407:
The HTTP 407 Proxy Authentication Required client error status response code indicates that the request has not been applied because it lacks valid authentication credentials for a proxy server that is between the browser and the server that can access the requested resource.
It would be nice to have nicely formatted error for HTTP 407 like with the other cases of
|
def format_error({:proxy, reason}) do |
|
case reason do |
|
:tunnel_timeout -> |
|
"proxy tunnel timeout" |
|
|
|
{:unexpected_status, status} -> |
|
"expected tunnel proxy to return a status between 200 and 299, got: #{inspect(status)}" |
|
|
|
{:unexpected_trailing_responses, responses} -> |
|
"tunnel proxy returned unexpected trailer responses: #{inspect(responses)}" |
|
|
|
http_reason -> |
|
"error when establishing the tunnel proxy connection: " <> |
|
HTTP1.format_error(http_reason) |
|
end |
|
end |
Observed log:
Mint source code:
mint/lib/mint/tunnel_proxy.ex
Line 138 in d307008
From MDN HTTP 407:
It would be nice to have nicely formatted error for HTTP 407 like with the other cases of
mint/lib/mint/tunnel_proxy.ex
Lines 132 to 147 in d307008