Skip to content

Commit

Permalink
Merge pull request #775 from CosmWasm/redact-query-errors
Browse files Browse the repository at this point in the history
Redact query errors
  • Loading branch information
ethanfrey authored Mar 9, 2022
2 parents f35a13f + 5757449 commit b7dd4ce
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions x/wasm/keeper/query_plugins.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ func (q QueryHandler) Query(request wasmvmtypes.QueryRequest, gasLimit uint64) (
if ok := errors.As(err, &noSuchContract); ok {
return res, wasmvmtypes.NoSuchContract{Addr: noSuchContract.Addr}
}
// Otherwise redact all (we can theoretically redact less in the future)
if err != nil {
// Issue #759 - we don't return error string for worries of non-determinism
// moduleLogger(ctx).Info("Redacting submessage error", "cause", err)
err = errors.New(redactError(err))
}
return res, err
}

Expand Down

0 comments on commit b7dd4ce

Please sign in to comment.