Plugins/HTTP: include uri in error
This commit is contained in:
parent
4891f3a919
commit
40b8e35dac
1 changed files with 2 additions and 1 deletions
|
|
@ -51,7 +51,8 @@ func NewStatusError(resp *http.Response) *StatusError {
|
|||
}
|
||||
|
||||
func (e *StatusError) Error() string {
|
||||
return fmt.Sprintf("unexpected status: %d (%s)", e.resp.StatusCode, http.StatusText(e.resp.StatusCode))
|
||||
req := e.resp.Request
|
||||
return fmt.Sprintf("unexpected status: %d (%s) %s %s", e.resp.StatusCode, http.StatusText(e.resp.StatusCode), req.Method, req.URL)
|
||||
}
|
||||
|
||||
// Response returns the response with the unexpected error
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue