-
Notifications
You must be signed in to change notification settings - Fork 43
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
Inspect why error no more includes a human-readable message #177
Comments
Ah, I have a suspicion about what happened here ... I think the Anchor client might convert the error codes back to the message, and at some point maybe we switched how we call the program, so the Anchor client no longer had the opportunity to translate the error? We recently removed the Anchor client entirely, so now it’s even harder to translate it into a human-readable message ... but frankly I think these error codes are not useful, and the on-chain program should print the message to its log instead. |
I think it’s a problem with Anchor after all, maybe a bug introduced in a later version. let program_error = ProgramError::from(multisig::ErrorCode::AlreadyExecuted);
println!("{:?}", program_error);
let anchor_error = multisig::Error::from(program_error);
println!("{:?}", anchor_error); prints
while I would have expected it to print
it seems that converting back the error code to the structured error is broken. |
I believe I found the cause of this: coral-xyz/anchor#354 (comment) |
#360 adds a workaround for this problem, so let’s close the issue. |
Cross-referencing comment (3 occurences) in
tests/test_multisig.py
The text was updated successfully, but these errors were encountered: