Skip to content
This repository was archived by the owner on Jan 6, 2024. It is now read-only.
This repository was archived by the owner on Jan 6, 2024. It is now read-only.

Non PSR-18 exceptions #61

Closed
Closed
@gmponos

Description

@gmponos
Q A
Bug? yes
New Feature? no
Version 2.0

Hello,

According to PSR-18

A Client MUST throw an instance of Psr\Http\Client\ClientExceptionInterface if and only if it is unable to send the HTTP request at all or if the HTTP response could not be parsed into a PSR-7 response object.

There was a tag made today that Guzzle-6 adapter is PSR-18 compliant https://github.com/php-http/guzzle6-adapter/releases/tag/v2.0.0

I am trying to understand how this works since there are cases that guzzle throws non PSR exception.

https://github.com/guzzle/guzzle/blob/master/src/Handler/StreamHandler.php#L55
https://github.com/guzzle/guzzle/blob/master/src/Handler/StreamHandler.php#L252
https://github.com/guzzle/guzzle/blob/master/src/Handler/CurlFactory.php#L458
https://github.com/guzzle/guzzle/blob/master/src/Handler/CurlFactory.php#L531

Maybe I am wrong or I miss something..

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