-
Notifications
You must be signed in to change notification settings - Fork 190
INTMDB-298: fixes a bug where you couldn't delete a team in team resource #668
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
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.
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
var target *matlas.ErrorResponse | ||
if errors.As(err, &target) && target.ErrorCode != "USER_UNAUTHORIZED" { | ||
return diag.Errorf("error removing team(%s) from the project(%s): %s", teamID, 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.
[nit] I wouldn’t silently ignore the error USER_UNAUTHORIZED
but at least print a warning so that the user is aware that the team removal operation failed because they don't have the correct permission.
Description
CANNOT_DELETE_TEAM_ASSIGNED_TO_PROJECT
when trying to delete one team in team resourceLink to any related issue(s): #662
Type of change:
Required Checklist:
Further comments