Skip to content

Commit 4c8ce66

Browse files
committed
add more error context to defaultErrorReader
1 parent 18841cc commit 4c8ce66

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ func defaultErrorReader(b []byte) error {
164164
var errorResponse ErrorResponse
165165

166166
if err := json.Unmarshal(b, &errorResponse); err != nil {
167-
return err
167+
return fmt.Errorf("failed to unmarshal response json %s, error: %v", string(b), err)
168168
}
169169

170170
return errorResponse

0 commit comments

Comments
 (0)