Skip to content

SocketException distinction #379

@luzrain

Description

@luzrain

There is an Amp\Http\Client\SocketException exception that covers different types of connection errors. However, I found out that it's not possible to distinguish between them programmatically, they are all the same except for the error message.
I need to differentiate a specific error, and the only way to do that is to check if the error message contains a substring, which is not reliable.
What do you think we can do about this? My first thought is to add unique exception codes to all SocketException cases.

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