cloudflared
cloudflared copied to clipboard
Show specific error messages on errors creating the tunnel. Fixes #972
As described in #972, when creating a tunnel, cloudflared
shows a somewhat cryptic error message on HTTP errors such as 429 (too many requests), since RunQuickTunnel()
tries to parse the HTTP response body as JSON no matter the response status code.
This change detects non-200 status codes, shows a specific error for 429, and reports the status code for other HTTP errors.
Tests are included, and all existing and new tests pass.