Add Result types to Go SDK and properly populate body/map fields (#358)
This commit is contained in:
1 parent
d8dc1ed0b2
commit
a00ee7a948
61 files changed
+1888
-1099
No files matched your search
@@ -71,6 +71,9 @@ func (r *Response) Decode(inStruct interface{}) (*Error, error) {
|
||||
}
|
||||
}
|
||||
if r.resp.StatusCode >= 400 {
|
||||
errStruct := inStruct.(*Error)
|
||||
errStruct.responseBody = r.Body
|
||||
errStruct.responseMap = r.Map
|
||||
return apiErr, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user