From d5e26610e04e1998e2cb898b75178969ee638a9e Mon Sep 17 00:00:00 2001 From: Artem Date: Fri, 30 Jun 2023 20:29:08 +0200 Subject: [PATCH] More informative errors on view execution --- internal/noderpc/errors.go | 4 ++++ internal/noderpc/responses.go | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/internal/noderpc/errors.go b/internal/noderpc/errors.go index 9d0fa1b1d..8bbb16116 100644 --- a/internal/noderpc/errors.go +++ b/internal/noderpc/errors.go @@ -74,6 +74,10 @@ func (e InvalidNodeResponse) Error() string { s.WriteByte('\n') } s.WriteString(e.Errors[i].ID) + if len(e.Errors[i].With) > 0 { + s.WriteString(" with ") + _, _ = s.Write(e.Errors[i].With) + } } } else { _, _ = s.Write(e.Raw) diff --git a/internal/noderpc/responses.go b/internal/noderpc/responses.go index 71bf436dc..535d11727 100644 --- a/internal/noderpc/responses.go +++ b/internal/noderpc/responses.go @@ -301,8 +301,9 @@ type RunCodeResponse struct { // RunCodeError - type RunCodeError struct { - ID string `json:"id"` - Kind string `json:"kind,omitempty"` + ID string `json:"id"` + Kind string `json:"kind,omitempty"` + With stdJSON.RawMessage `json:"with,omitempty"` } // OperationError -