Skip to content

Error checking #5

@adamchainz

Description

@adamchainz

Currently Client.api_get assumes the response it retrieves is a success. There should be error checking like if response.status_code != 200: raise HttpError().

( Avoid response.raise_for_status(), which only raises an error for definitely-error codes. For your API, you know that if you receive anything other than 200 then something has gone wrong.)

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