mint icon indicating copy to clipboard operation
mint copied to clipboard

HTTP 407 error formatting when using proxies

Open jozuas opened this issue 8 months ago • 6 comments

Observed log:

** (Mint.HTTPError) expected tunnel proxy to return a status between 200 and 299, got: 407

Mint source code: https://github.com/elixir-mint/mint/blob/d3070089d4d22e8062e94df1334889437658fdee/lib/mint/tunnel_proxy.ex#L138

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 https://github.com/elixir-mint/mint/blob/d3070089d4d22e8062e94df1334889437658fdee/lib/mint/tunnel_proxy.ex#L132-L147

jozuas avatar Jun 26 '24 12:06 jozuas