forked from go-packages/paypal
Print error details in addition to message and http code (#131)
* Print error details in addition to message and http code * %v -> %+v
This commit is contained in:
parent
16c52d39ba
commit
5822d5ee58
2
types.go
2
types.go
|
@ -978,7 +978,7 @@ type (
|
||||||
|
|
||||||
// Error method implementation for ErrorResponse struct
|
// Error method implementation for ErrorResponse struct
|
||||||
func (r *ErrorResponse) Error() string {
|
func (r *ErrorResponse) Error() string {
|
||||||
return fmt.Sprintf("%v %v: %d %s", r.Response.Request.Method, r.Response.Request.URL, r.Response.StatusCode, r.Message)
|
return fmt.Sprintf("%v %v: %d %s, %+v", r.Response.Request.Method, r.Response.Request.URL, r.Response.StatusCode, r.Message, r.Details)
|
||||||
}
|
}
|
||||||
|
|
||||||
// MarshalJSON for JSONTime
|
// MarshalJSON for JSONTime
|
||||||
|
|
Loading…
Reference in New Issue
Block a user