From 3161152f2296ab43e84c9c439f4ffd18132cc686 Mon Sep 17 00:00:00 2001 From: Femi Novia Lina Date: Tue, 8 Oct 2024 17:45:51 +0700 Subject: [PATCH] fix: handle user deletion error --- internal/store/postgres/user_repository.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/store/postgres/user_repository.go b/internal/store/postgres/user_repository.go index 21955b962..4f4e59a09 100644 --- a/internal/store/postgres/user_repository.go +++ b/internal/store/postgres/user_repository.go @@ -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 {