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

View calls don't provide a parsed error representation #493

Open
ilblackdragon opened this issue Feb 8, 2021 · 1 comment
Open

View calls don't provide a parsed error representation #493

ilblackdragon opened this issue Feb 8, 2021 · 1 comment
Assignees

Comments

@ilblackdragon
Copy link
Member

ilblackdragon commented Feb 8, 2021

Currently if view call fails, the error object just contains a string that contains something like this:

 {
 "error": "wasm execution failed with error: FunctionCallError(HostError(GuestPanic 

 { panic_msg: \"08c379a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000114552525f5355425f554e444552464c4f57000000000000000000000000000000\" } 

))",
 "logs": [],
 "block_height": 365845,
 "block_hash": "8TnnfpGTVduxXQ5o6F9oiwhNDyAg61cPpGNEChZCF3Ds"
 }
    1. Expected result

Expected to have a parsed error that one can access via error.FunctionCallError.HostError.GuestPanic.panic_msg.
Even better something that would shorten this and either allow to catch depending on type with catch or have a match.

@vikinatora
Copy link
Collaborator

Will be resolved by #1275

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: NEW❗
Development

No branches or pull requests

3 participants