Skip to content

Commit

Permalink
More informative errors on view execution (#979)
Browse files Browse the repository at this point in the history
  • Loading branch information
aopoltorzhicky authored Jun 30, 2023
1 parent 7e3f802 commit 987345f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions internal/noderpc/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 3 additions & 2 deletions internal/noderpc/responses.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 -
Expand Down

0 comments on commit 987345f

Please sign in to comment.