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.
I am using
oauth2under 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
RequestTokenErrordoes 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
RequestTokenErrorwould 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.