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

Fix error handling in authInterceptor.login #436

Closed
wants to merge 1 commit into from
Closed

Conversation

reugn
Copy link
Member

@reugn reugn commented May 23, 2024

No description provided.

@reugn reugn requested a review from khaf May 23, 2024 16:38
@khaf
Copy link
Collaborator

khaf commented May 23, 2024

@reugn Thanks for the PR. I think shadowing the original err Here would be a better idea to prevent this issue to return in the future.

@@ -139,14 +139,14 @@ func (interceptor *authInterceptor) login() Error {

claims := strings.Split(res.GetToken(), ".")
decClaims, gerr := base64.RawURLEncoding.DecodeString(claims[1])
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's remove the source of the issue here and replce all the gerr instances with err.

Copy link
Member Author

Choose a reason for hiding this comment

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

@khaf, the assignment of the Error type to err and the error type to gerr may have required an additional error variable.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I see; thanks for the update.

@reugn reugn changed the base branch from v7 to stage July 17, 2024 12:55
@reugn reugn closed this Jul 17, 2024
@reugn reugn deleted the fix-error-handling branch July 17, 2024 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants