Skip to content

Commit

Permalink
Merge pull request #883 from crypto-com/update/error-log
Browse files Browse the repository at this point in the history
Update cosmos and tendermint error log
  • Loading branch information
vincentysc authored Apr 23, 2024
2 parents 8992bcd + 957d02d commit 9b18d96
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion infrastructure/cosmosapp/httpclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ func (client *HTTPClient) request(method string, queryKVs ...queryKV) (io.ReadCl
}
bodyJsonMap := make(map[string]interface{})
if err = json.Unmarshal([]byte(rawRespBody), &bodyJsonMap); err != nil {
return nil, fmt.Errorf("error unmarshalling Body : %w", err)
return nil, fmt.Errorf("error unmarshalling Body : %w: %s", err, string(rawRespBody))
}

return nil, fmt.Errorf("error requesting Cosmos %s %s endpoint: %s Body: %v Header: %v", method, queryUrl, rawResp.Status, bodyJsonMap, rawResp.Header)
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/tendermint/httpclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ func (client *HTTPClient) request(method string, queryKVs ...queryKV) (io.ReadCl
}
bodyJsonMap := make(map[string]interface{})
if err = json.Unmarshal([]byte(rawRespBody), &bodyJsonMap); err != nil {
return nil, fmt.Errorf("error unmarshalling Body : %w", err)
return nil, fmt.Errorf("error unmarshalling Body : %w: %s", err, string(rawRespBody))
}

return nil, fmt.Errorf("error requesting Tendermint %s %s endpoint: %s Body: %v Header: %v", method, url, rawResp.Status, bodyJsonMap, rawResp.Header)
Expand Down

0 comments on commit 9b18d96

Please sign in to comment.