feat(baseapp)!: Indicate pruning with "not found" rather than "invalid request" (#19993)

This commit is contained in:
Richard Gibson 2024-04-10 07:14:27 -04:00 committed by GitHub
parent a6f3fbfbeb
commit 4c446f8b7d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -170,6 +170,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

View File

@ -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,
)
}