Skip to content

Commit

Permalink
Merge pull request #701 from CosmWasm/687-proper-systemerror
Browse files Browse the repository at this point in the history
`ContractInfo` query: return `NoSuchContract` system error instead of sdk error
  • Loading branch information
maurolacy authored Jan 3, 2022
2 parents e7f41f2 + 8d07dc0 commit f621948
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion x/wasm/keeper/query_plugins.go
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ func WasmQuerier(k wasmQueryKeeper) func(ctx sdk.Context, request *wasmvmtypes.W
}
info := k.GetContractInfo(ctx, addr)
if info == nil {
return nil, sdkerrors.Wrap(sdkerrors.ErrUnknownAddress, request.ContractInfo.ContractAddr)
return nil, wasmvmtypes.NoSuchContract{Addr: request.ContractInfo.ContractAddr}
}

res := wasmvmtypes.ContractInfoResponse{
Expand Down

0 comments on commit f621948

Please sign in to comment.