Skip to content

feat: Expose http status code on request_async / request methods #302

@c-thiel

Description

@c-thiel

I am using oauth2 under the hood to authenticate clients.
If an authentication request fails, I don't want to exit immediately, but potentially retry.

Retries should only happen on 5XX error codes, not 4XX.

Currently RequestTokenError does not expose the status code of the underlying request, which makes it hard to categorize the root cause of the failure.

It would be really helpful if RequestTokenError would expose the underlying status code for all error variants.

I ran into this issue specificly for the client credential flow, but I am sure other flows will benefit too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions