Skip to content

Commit 7c016d2

Browse files
committed
Return correct error
1 parent d0bf546 commit 7c016d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/postgres/roles.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ func (c *Client) SafeDeleteRole(ctx context.Context, roleName string) error {
393393
if grantsRevokeError != nil {
394394
l.Error("error revoking grants from role", zap.Error(grantsRevokeError))
395395
if !errors.Is(grantsRevokeError, errRevokeGrantsFromRole) {
396-
return fmt.Errorf("error revoking existing grants from role: %w", err)
396+
return fmt.Errorf("error revoking existing grants from role: %w", grantsRevokeError)
397397
}
398398
}
399399

0 commit comments

Comments
 (0)