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 CasperClientException to include error response "data" field if populated #260

Closed
meywood opened this issue Mar 20, 2024 · 0 comments · Fixed by #261
Closed

Improve CasperClientException to include error response "data" field if populated #260

meywood opened this issue Mar 20, 2024 · 0 comments · Fixed by #261
Assignees

Comments

@meywood
Copy link
Collaborator

meywood commented Mar 20, 2024

The "data" field on an invalid request can contain useful information on why an RPC request failed. See the following example:

{"jsonrpc":"2.0","id":"1754083765","error":{"code":-32008,"message":"Invalid Deploy","data":"contract package at ee6cda1c92b1c17b7379139ca7a12bf4df8186ff5df63e65caa94a162cdeae5b does not exist at state root hash 3841399103ddb56fc6f9209a8181140f98c83365446f050b607985225934640a of block 55f6f15de3c4bbb6faf203725c0e29ae605dc676df8f32ee1e292233b2d7cfce at height 3217"}}

if the data field is present if should populate the CasperClientException along with the error message.

@meywood meywood self-assigned this Mar 20, 2024
cnorburn added a commit that referenced this issue Apr 15, 2024
Issues/260 - Fixed issue with CasperClientException not displaying data message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
1 participant