mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-05-20 12:02:01 -04:00
internal/registry: Add URL to error message for clarity (#29298)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user