diff --git a/infrastructure/cosmosapp/httpclient.go b/infrastructure/cosmosapp/httpclient.go index d3d54140..327ac5aa 100644 --- a/infrastructure/cosmosapp/httpclient.go +++ b/infrastructure/cosmosapp/httpclient.go @@ -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) diff --git a/infrastructure/tendermint/httpclient.go b/infrastructure/tendermint/httpclient.go index 82c86162..11e08236 100644 --- a/infrastructure/tendermint/httpclient.go +++ b/infrastructure/tendermint/httpclient.go @@ -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)