Skip to content

Null pointer exception #21

@rukaelin

Description

@rukaelin

We are using your SDK and at the mentioned line, a null pointer exception occurred.
$errorResponse[0] is null, so calling a method on it fails.

parent::__construct($errorResponse[0]->getMessage(), null, $previous);

here is the stack trace:

Uncaught Error: Call to a member function getMessage() on null in ***/vendor/hyperwallet/sdk/src/Hyperwallet/Exception/HyperwalletApiException.php:26
Stack trace:
#0 ***/vendor/hyperwallet/sdk/src/Hyperwallet/Util/ApiClient.php(145): Hyperwallet\Exception\HyperwalletApiException->__construct(Object(Hyperwallet\Response\ErrorResponse), Object(GuzzleHttp\Exception\ServerException))
#1 ***/vendor/hyperwallet/sdk/src/Hyperwallet/Util/ApiClient.php(107): Hyperwallet\Util\ApiClient->doRequest('GET', '/rest/v3/transf...', Array, Array)
#2 ***/vendor/hyperwallet/sdk/src/Hyperwallet/Hyperwallet.php(1347): Hyperwallet\Util\ApiClient->doGet('/rest/v3/transf...', Array, Array)
#3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions