diff --git a/tools/rosetta/CHANGELOG.md b/tools/rosetta/CHANGELOG.md index ebad9ecc73..3e8c6b13e1 100644 --- a/tools/rosetta/CHANGELOG.md +++ b/tools/rosetta/CHANGELOG.md @@ -40,6 +40,10 @@ Ref: https://keepachangelog.com/en/1.0.0/ * [#14272](https://github.com/cosmos/cosmos-sdk/pull/14272) Use `coinbase/rosetta-sdk-go/types` packages instead of comsos fork. +### Bug Fixes + +* [#14285](https://github.com/cosmos/cosmos-sdk/pull/14285) Sets tendermint errors status codes to 500 + ## v0.2.0 2022-12-07 ### Improvements diff --git a/tools/rosetta/lib/errors/errors.go b/tools/rosetta/lib/errors/errors.go index 5fcc0c7602..7cbbdbcd1a 100644 --- a/tools/rosetta/lib/errors/errors.go +++ b/tools/rosetta/lib/errors/errors.go @@ -5,6 +5,7 @@ package errors import ( "fmt" + "net/http" grpccodes "google.golang.org/grpc/codes" grpcstatus "google.golang.org/grpc/status" @@ -83,7 +84,7 @@ func ToRosetta(err error) *types.Error { // fromTendermintToRosettaError converts a tendermint jsonrpc error to rosetta error func fromTendermintToRosettaError(err *tmtypes.RPCError) *Error { return &Error{rosErr: &types.Error{ - Code: int32(err.Code), + Code: http.StatusInternalServerError, Message: err.Message, Details: map[string]interface{}{ "info": err.Data,