Skip to content

Unable to Handle Empty API Error Responses #4356

Open

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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