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

Display the causes of an error #931

Merged
merged 4 commits into from
Jan 31, 2023
Merged

Display the causes of an error #931

merged 4 commits into from
Jan 31, 2023

Conversation

ascjones
Copy link
Collaborator

Error information was missing the error chain, and only displaying the context message:

image

This PR use the Debug impl to display the error chain with the cause:

image

@athei
Copy link
Contributor

athei commented Jan 30, 2023

Okay I don't want to shave the yak here but can you do the same for RPC error? I tried to submit an extrinsic which was tot heavy for the block. The only thing I get back is:

ERROR: Rpc error: RPC error

Probably something directly coming back from subxt. There should be more information. It is the same error whether your extrinsic is invalid or you URL is wrong or missing. This is very confusing.

@SkymanOne
Copy link
Contributor

Any chance we can nicely format the error put and avoid?

... exited with error: error: ...

@ascjones
Copy link
Collaborator Author

Okay I don't want to shave the yak here but can you do the same for RPC error? I tried to submit an extrinsic which was tot heavy for the block. The only thing I get back is:

ERROR: Rpc error: RPC error

Probably something directly coming back from subxt. There should be more information. It is the same error whether your extrinsic is invalid or you URL is wrong or missing. This is very confusing.

Indeed this something with the subxt::Error. Certainly it used to display at least some unstructured information for an invalid transaction. Needs more investigation so won't do it as part of this PR. See #934

@ascjones ascjones merged commit 049e46f into master Jan 31, 2023
@ascjones ascjones deleted the aj/print-error-cause branch January 31, 2023 21:22
@SkymanOne SkymanOne mentioned this pull request Feb 1, 2023
@ascjones ascjones mentioned this pull request Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants