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

Handle Invalid API Key #3539

Closed
wants to merge 5 commits into from
Closed

Handle Invalid API Key #3539

wants to merge 5 commits into from

Conversation

MDrakos
Copy link
Member

@MDrakos MDrakos commented Oct 11, 2024

TaskDX-3080 We error out if the stored API key is invalid

@MDrakos MDrakos changed the title Dx 3080 Handle Invalid API Key Oct 11, 2024
@MDrakos MDrakos marked this pull request as ready for review October 11, 2024 22:20
@MDrakos MDrakos requested a review from Naatan October 11, 2024 22:20
Copy link
Member

@Naatan Naatan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tested this? Please add an integration test for this.

I'm pretty sure the code as written won't relay anything to the user because it's failing at the state-svc level, but I could be wrong.

Comment on lines +95 to +101
if token := a.Auth.AvailableAPIToken(); token != "" {
err := auth.AuthenticateWithToken(token, a.Auth)
if err != nil {
return errs.Wrap(err, "Failed to authenticate with API key")
}
return nil
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was this added for? This scenario is already handled, afaik.

@MDrakos
Copy link
Member Author

MDrakos commented Oct 15, 2024

Closing this as there is a new blocker. See story for details.

@MDrakos MDrakos closed this Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants