Skip to content

Commit

Permalink
feat(baseapp)!: Indicate pruning with "not found" rather than "invali…
Browse files Browse the repository at this point in the history
…d request"

Fixes cosmos#19992
  • Loading branch information
gibson042 committed Apr 9, 2024
1 parent a5d4c40 commit 221bb9c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i
* Every module has the codec already, passing it created an unneeded dependency.
* Additionally, to reflect this change, the module manager does not take a codec either.
* (runtime) [#19747](https://github.com/cosmos/cosmos-sdk/pull/19747) `runtime.ValidatorAddressCodec` and `runtime.ConsensusAddressCodec` have been moved to `core`.
* (baseapp) [#19993](https://github.com/cosmos/cosmos-sdk/pull/19993) Indicate pruning with error code "not found" rather than "invalid request".

### Client Breaking Changes

Expand Down
2 changes: 1 addition & 1 deletion baseapp/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -1242,7 +1242,7 @@ func (app *BaseApp) CreateQueryContext(height int64, prove bool) (sdk.Context, e
if err != nil {
return sdk.Context{},
errorsmod.Wrapf(
sdkerrors.ErrInvalidRequest,
sdkerrors.ErrNotFound,
"failed to load state at height %d; %s (latest height: %d)", height, err, lastBlockHeight,
)
}
Expand Down

0 comments on commit 221bb9c

Please sign in to comment.