Skip to content

http: send more informative reason phrases in errors#573

Merged
djs55 merged 1 commit intomoby:masterfrom
djs55:improve-proxy-errors
Apr 6, 2022
Merged

http: send more informative reason phrases in errors#573
djs55 merged 1 commit intomoby:masterfrom
djs55:improve-proxy-errors

Conversation

@djs55
Copy link
Copy Markdown
Collaborator

@djs55 djs55 commented Apr 6, 2022

Previously we explained more in the body, but this is usually ignored by tools like docker pull.

The reason phrase is usually printed, so write some custom text there (rather than "Service_unavailable")

Before:

dave@m1 vpnkit % docker pull registry-1.docker.io:1235/old:error
Error response from daemon: Get "https://registry-1.docker.io:1235/v2/": Service Unavailable

After:

dave@m1 vpnkit % docker pull registry-1.docker.io:1234/new:error
Error response from daemon: Get "https://registry-1.docker.io:1234/v2/": unable to connect to 34.237.244.67:1234. Do you need an HTTP proxy?

Signed-off-by: David Scott dave@recoil.org

Previously we explained more in the body, but this is usually ignored by
tools like docker pull.

The reason phrase is usually printed, so write some custom text there
(rather than "Service_unavailable")

Signed-off-by: David Scott <dave@recoil.org>
@djs55 djs55 merged commit 57a9ee3 into moby:master Apr 6, 2022
@djs55 djs55 deleted the improve-proxy-errors branch April 6, 2022 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant