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

Improve the error returned when a view simulation hits a FAILWITH instruction #1297

Closed
roxaneletourneau opened this issue Jan 10, 2022 · 0 comments · Fixed by #1375
Closed
Assignees
Milestone

Comments

@roxaneletourneau
Copy link
Collaborator

When a view simulation fails, Taquito parses the error received from the RPC. If the error contains a with property, which is the case when a FAILWITH instruction is reached, Taquito throws a ViewSimulationError. The details are included in the error message of the ViewSimulationError which looks like The simulation of the on-chain view named x failed with: x.

In the current implementation, the message is not useful, because the error must be retrieved from it by parsing the string.

Add an extra field to the class ViewSimulationError that will only store the error that the contract gave when a FAILWITH instruction is reached.

@roxaneletourneau roxaneletourneau changed the title Improved the error returned when a view simulation hits a FAILWITH instruction Improve the error returned when a view simulation hits a FAILWITH instruction Jan 10, 2022
@Innkst Innkst added this to the v11.3 milestone Jan 14, 2022
@Innkst Innkst modified the milestones: v11.4, v11.3 Jan 15, 2022
@roxaneletourneau roxaneletourneau modified the milestones: v11.3, v11.2 Feb 1, 2022
@roxaneletourneau roxaneletourneau self-assigned this Feb 1, 2022
roxaneletourneau added a commit that referenced this issue Feb 1, 2022
* Added a note to readme about libudev

* feat(views error): added a failwith property to the ViewSimulationError

fix #1297

* Fixed test
@ac10n ac10n moved this to Done in Taquito Dev Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants