Skip to content

Better output on exceptions #760

Closed
@dereuromark

Description

@dereuromark

$response->getReasonPhrase() should be included in GithubExceptionThrower

if (400 == $response->getStatusCode()) {
    throw new ErrorException($content['message'], 400);
}

for example just outputs

Problems parsing JSON

But in fact the reason phrase contains the details: reasonPhrase: "Bad Request"
So this should be part of the debugging data IMO.

E.g. as details in brackets:

Problems parsing JSON (Bad Request)

This way I know that this not about the response content, but the actual request.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions