Skip to content

Commit

Permalink
internal/registry: Add URL to error message for clarity (#29298)
Browse files Browse the repository at this point in the history
  • Loading branch information
radeksimko committed Aug 10, 2021
1 parent 7a95bbf commit 2496bc2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/getproviders/registry_client.go
Expand Up @@ -478,7 +478,7 @@ func maxRetryErrorHandler(resp *http.Response, err error, numTries int) (*http.R
// both response and error.
var errMsg string
if resp != nil {
errMsg = fmt.Sprintf(": %d", resp.StatusCode)
errMsg = fmt.Sprintf(": %s returned from %s", resp.Status, resp.Request.URL)
} else if err != nil {
errMsg = fmt.Sprintf(": %s", err)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/registry/client.go
Expand Up @@ -295,7 +295,7 @@ func maxRetryErrorHandler(resp *http.Response, err error, numTries int) (*http.R
// both response and error.
var errMsg string
if resp != nil {
errMsg = fmt.Sprintf(": %d", resp.StatusCode)
errMsg = fmt.Sprintf(": %s returned from %s", resp.Status, resp.Request.URL)
} else if err != nil {
errMsg = fmt.Sprintf(": %s", err)
}
Expand Down

0 comments on commit 2496bc2

Please sign in to comment.