-
Notifications
You must be signed in to change notification settings - Fork 178
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
INTMDB-295: Fixes a bug about unauthorized error in project resource #664
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small comment
var target *matlas.ErrorResponse | ||
if errors.As(err, &target) && target.ErrorCode != "USER_UNAUTHORIZED" { | ||
return diag.Errorf("error getting project's api keys (%s): %s", projectID, err) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
based on this change, apiKeys
will still be empty when the request getProjectAPIKeys
returns the error USER_UNAUTHORIZED
so I would print a warning explaining why this field is empty.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
Link to any related issue(s):
#659
Type of change:
Required Checklist:
Further comments