diff --git a/CHANGELOG.md b/CHANGELOG.md index dad1090553e..6dddbc610d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * [#2739](https://github.com/osmosis-labs/osmosis/pull/2739) Add pool type query * [#2803](https://github.com/osmosis-labs/osmosis/pull/2803) Fix total pool liquidity CLI query. +* [#2914](https://github.com/osmosis-labs/osmosis/pull/2914) Remove out of gas panics from node logs ### Misc Improvements diff --git a/osmoutils/cache_ctx.go b/osmoutils/cache_ctx.go index 60b382236ca..07941be128f 100644 --- a/osmoutils/cache_ctx.go +++ b/osmoutils/cache_ctx.go @@ -6,6 +6,7 @@ import ( "runtime" "runtime/debug" + "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -40,6 +41,9 @@ func ApplyFuncIfNoError(ctx sdk.Context, f func(ctx sdk.Context) error) (err err func PrintPanicRecoveryError(ctx sdk.Context, recoveryError interface{}) { errStackTrace := string(debug.Stack()) switch e := recoveryError.(type) { + case types.ErrorOutOfGas: + ctx.Logger().Debug("out of gas error inside panic recovery block: " + e.Descriptor) + return case string: ctx.Logger().Error("Recovering from (string) panic: " + e) case runtime.Error: