Skip to content

fix(cam): [124298925] tencentcloud_cam_group_membership optmize logic while user no exist #3380

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

Merged
merged 2 commits into from
May 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/3380.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
resource/tencentcloud_cam_group_membership: throw error while user not exist
```
7 changes: 0 additions & 7 deletions tencentcloud/services/cam/service_tencentcloud_cam.go
Original file line number Diff line number Diff line change
Expand Up @@ -864,13 +864,6 @@ func (me *CamService) DescribeUserById(ctx context.Context, userId string) (resp
if err != nil {
log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n",
logId, request.GetAction(), request.ToJsonString(), err.Error())
if ee, ok := err.(*sdkErrors.TencentCloudSDKError); ok {
errCode := ee.GetCode()
//check if read empty
if strings.Contains(errCode, "ResourceNotFound") {
return
}
}
errRet = err
return
}
Expand Down
Loading