Skip to content

Better error message in error handling or at least logging in post_returning_json and get_returning_json #8

@LeivHalvorL

Description

@LeivHalvorL

When (client.py ) post_returning_json (and get_returing_json and put_returning.json) is called without param ok_status_codes
only the response code 200 is added as status code that is ok before calling self.post. But when another status code than 200 is returned, the error message is " HTTPError(response=response)" which doesn't provide enough information.
It's is necessary to dot into the response proprty of the exception to find the response code. Is it possible to have the error code in the str representation of the HttpError?

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