Skip to content

Unable to Handle Empty API Error Responses #4356

@simonmsara

Description

@simonmsara

A smoke test request was made using the \Alphagov\Notifications\Client::sendSms method.

An error was thrown Warning: Trying to access array offset on null which came from Alphagov\Notifications\Exception\ApiException::__construct at line 19.

From what I can see the APIException is always expecting the body to be defined & have an error key. In this case the stream returned null and led to the error above.

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