Skip to content

Handle exceptions without HTTP responses in rejection handler #71

Open

Description

@xsalefter

Original discussion : #70 (comment)

This rejection handler assumes every failure has an HTTP response. A connection or DNS failure can reject with a Guzzle ConnectException, which has no getResponse() method; a RequestException can also have a null response. The callback then replaces the network failure with an unrelated PHP error. Propagate exceptions without a response before reading its status code.

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