Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error handling: retrieve variables used by failed instruction #187

Open
folex opened this issue Dec 7, 2021 · 0 comments
Open

Error handling: retrieve variables used by failed instruction #187

folex opened this issue Dec 7, 2021 · 0 comments
Labels
C-dx category: developer experience improvements

Comments

@folex
Copy link
Member

folex commented Dec 7, 2021

When instructions fail, it might look like this:

 {
      "instruction": "call flattened.$.[0].peer_id (flattened.$.[0].service_id.[0] \"getPublicUser\") [] user",
      "msg": "value '[{\"peer_id\":\"12D3KooWGmJSe6Sd9ART9X5Lw6NtAZBWgcjSPHVkSgiHsNQQaMhJ\",\"relay_id\":[\"12D3KooWAPryc7ZKpbPPhEdHjLiHZYzHGYPkQGBwE77R2eRLMUtQ\"],\"service_id\":[\"8d802ce1-df37-41b3-ad94-a9984b44126d\"],\"set_by\":\"12D3KooWEWFQsdrXaUsUoX4M1V4U8gd7nHoB3j6ZSZAyaD8S3ido\",\"timestamp_created\":1638879987,\"value\":\"vc solution\",\"weight\":10000}]' is not an map-type to match field algebra with field_name = 'peer_id'",
      "peer_id": "12D3KooWEWFQsdrXaUsUoX4M1V4U8gd7nHoB3j6ZSZAyaD8S3ido",
}

Here, in the msg field we can see value of flattened.$.[0]. But we don't see the whole flattened, even though it might be very relevant for debugging the cause of error.

It would be great to be able to retrieve all the data used by failed instruction, and present it along the error. Like:

the following variables were used

flattened: [[{ peer_id: ..., relay_id: ... ]]
@folex folex added the C-dx category: developer experience improvements label Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-dx category: developer experience improvements
Projects
None yet
Development

No branches or pull requests

1 participant