Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Revert to use `%s` again, because `stat.Error` is a `string` and thus cannot be wrapped as an error.
  • Loading branch information
josvazg authored Oct 1, 2024
1 parent 30cc42b commit e89ede5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/controller/atlasproject/custom_roles.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ func syncCustomRolesStatus(ctx *workflow.Context, desiredCustomRoles []customrol
if ok {
if stat.Status == status.CustomRoleStatusFailed {
statuses = append(statuses, stat)
err = errors.Join(err, fmt.Errorf("%w", stat.Error))
err = errors.Join(err, fmt.Errorf("%s", stat.Error))
}

continue
Expand All @@ -210,7 +210,7 @@ func syncCustomRolesStatus(ctx *workflow.Context, desiredCustomRoles []customrol
statuses = append(statuses, stat)

if stat.Status == status.CustomRoleStatusFailed {
err = errors.Join(err, fmt.Errorf("%w", stat.Error))
err = errors.Join(err, fmt.Errorf("%s", stat.Error))
}

continue
Expand All @@ -220,7 +220,7 @@ func syncCustomRolesStatus(ctx *workflow.Context, desiredCustomRoles []customrol
statuses = append(statuses, stat)

if stat.Status == status.CustomRoleStatusFailed {
err = errors.Join(err, fmt.Errorf("%w", stat.Error))
err = errors.Join(err, fmt.Errorf("%s", stat.Error))
}

continue
Expand Down

0 comments on commit e89ede5

Please sign in to comment.