From 5822d5ee5849c28bc2a0cf176bbf8430e8c6c922 Mon Sep 17 00:00:00 2001 From: Eric Lee Date: Mon, 16 Dec 2019 16:34:48 -0800 Subject: [PATCH] Print error details in addition to message and http code (#131) * Print error details in addition to message and http code * %v -> %+v --- types.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types.go b/types.go index c43c0f6..668d1e2 100644 --- a/types.go +++ b/types.go @@ -978,7 +978,7 @@ type ( // Error method implementation for ErrorResponse struct 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