Skip to content

ErrorException during error handling #9

@PawelPodkalicki

Description

@PawelPodkalicki

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}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions