gnolang / tm2-js-client

The Tendermint2 JS/TS client (SDK)
https://gno.land
Apache License 2.0
9 stars 2 forks source link

evaluateExpression does not return the error log #89

Open thehowl opened 10 months ago

thehowl commented 10 months ago

image

$ gnokey query vm/qeval --data 'gno.land/r/demo/chess'$'\n''Leaderboard("asd")'
Log: --= Error =--
Data: &errors.errorString{s:"invalid category"}
Msg Traces:
    0  /home/howl/go/pkg/mod/github.com/gnolang/gno@v0.0.0-20230925211159-9c7c0a577eb6/gno.land/pkg/sdk/vm/keeper.go:387 - VM query eval panic: invalid category

It would be useful if the client parsed the error and returned it in the thrown exception, so the underlying error could be captured & parsed by any caller.