Finish some todos

Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
This commit is contained in:
Vartan Benohanian
2020-08-17 22:01:04 -04:00
parent ac2fe30647
commit 29fdb0fa19
10 changed files with 103 additions and 81 deletions
+1 -1
View File
@@ -320,7 +320,7 @@ func CheckResponse(r *http.Response) error {
data, err := ioutil.ReadAll(r.Body)
if err == nil && len(data) > 0 {
json.Unmarshal(data, jsonErrorResponse)
if jsonErrorResponse.JSON != nil && len(jsonErrorResponse.JSON.Errors) > 0 {
if len(jsonErrorResponse.JSON.Errors) > 0 {
return jsonErrorResponse
}
}