Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define error for failed token fetch in TokenTransport #60

Open
oszkar-jona-form3 opened this issue Mar 18, 2022 · 0 comments
Open

Define error for failed token fetch in TokenTransport #60

oszkar-jona-form3 opened this issue Mar 18, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@oszkar-jona-form3
Copy link

As a user of the TokenTransport,
I want to explicitly check if the returned error is caused by failed token fetch
so that I can execute a different branch of code.

Currently, a generic error message is returned:

return nil, fmt.Errorf("non 200 status code getting token, status code: %d", authResponse.StatusCode)

Desired outcome would be to have a defined error (or custom error type should work as well)

var ErrGetAuthToken = errors.New("error getting auth token")
@oszkar-jona-form3 oszkar-jona-form3 added the enhancement New feature or request label Mar 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant