From f1059c7a31efcd1353e91140f018352a00162776 Mon Sep 17 00:00:00 2001 From: Jeff Thompson Date: Thu, 30 Nov 2023 16:19:44 +0100 Subject: [PATCH] fix: In gnoclient Render and QEval, need to check Response.Error Signed-off-by: Jeff Thompson --- gno.land/pkg/gnoclient/client_queries.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gno.land/pkg/gnoclient/client_queries.go b/gno.land/pkg/gnoclient/client_queries.go index ce03305d503..ba63c0d543e 100644 --- a/gno.land/pkg/gnoclient/client_queries.go +++ b/gno.land/pkg/gnoclient/client_queries.go @@ -93,6 +93,9 @@ func (c Client) Render(pkgPath string, args string) (string, *ctypes.ResultABCIQ if err != nil { return "", nil, errors.Wrap(err, "query render") } + if qres.Response.Error != nil { + return "", nil, errors.Wrap(qres.Response.Error, "Render failed: log:%s", qres.Response.Log) + } return string(qres.Response.Data), qres, nil } @@ -113,6 +116,9 @@ func (c Client) QEval(pkgPath string, expression string) (string, *ctypes.Result if err != nil { return "", nil, errors.Wrap(err, "query qeval") } + if qres.Response.Error != nil { + return "", nil, errors.Wrap(qres.Response.Error, "QEval failed: log:%s", qres.Response.Log) + } return string(qres.Response.Data), qres, nil }