Skip to content

Commit

Permalink
fix: handle user deletion error
Browse files Browse the repository at this point in the history
  • Loading branch information
FemiNoviaLina committed Oct 8, 2024
1 parent c5dd07b commit 3161152
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/store/postgres/user_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ func (r UserRepository) DeleteByEmail(ctx context.Context, email string, emailTa
return err
}
if rowCount == 0 {
return sql.ErrNoRows
return user.ErrNotExist
}
return nil
}); err != nil {
Expand Down

0 comments on commit 3161152

Please sign in to comment.