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

ErrorException during error handling #9

Open
PawelPodkalicki opened this issue Jun 28, 2024 · 0 comments
Open

ErrorException during error handling #9

PawelPodkalicki opened this issue Jun 28, 2024 · 0 comments

Comments

@PawelPodkalicki
Copy link

Hi,
I tried to transfer funds from empty account on devnet and received an error. I expected the error, but it wasn't handled properly.

Please, change

$error = $body['params']['error']? : $body['error'];

to

            $error = $body['params']['error'] ?? $body['error'];

The original JSON response was

{"jsonrpc":"2.0","error":{"code":-32002,"message":"Transaction simulation failed: Attempt to debit an account but found no record of a prior credit.","data":{"accounts":null,"err":"AccountNotFound","innerInstructions":null,"logs":[],"returnData":null,"unitsConsumed":0}},"id":80411175}
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

No branches or pull requests

1 participant