fix: don't pass db error
This commit is contained in:
parent
ea5a97c613
commit
5a9f4a5940
|
@ -202,7 +202,7 @@ func (s AccountServiceDefault) VerifyEmail(email string, token string) error {
|
||||||
|
|
||||||
if result.Error != nil {
|
if result.Error != nil {
|
||||||
if errors.Is(result.Error, gorm.ErrRecordNotFound) {
|
if errors.Is(result.Error, gorm.ErrRecordNotFound) {
|
||||||
return NewAccountError(ErrKeyEmailVerificationFailed, result.Error)
|
return NewAccountError(ErrKeyEmailVerificationFailed, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
return NewAccountError(ErrKeyDatabaseOperationFailed, result.Error)
|
return NewAccountError(ErrKeyDatabaseOperationFailed, result.Error)
|
||||||
|
|
Loading…
Reference in New Issue