mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-08-06 09:39:44 +08:00
rsponse 404 when delete not exist email (#15383)
fix #15357 Signed-off-by: a1012112796 <1012112796@qq.com>
This commit is contained in:
@ -222,6 +222,21 @@ func (err ErrEmailInvalid) Error() string {
|
||||
return fmt.Sprintf("e-mail invalid [email: %s]", err.Email)
|
||||
}
|
||||
|
||||
// ErrEmailAddressNotExist email address not exist
|
||||
type ErrEmailAddressNotExist struct {
|
||||
Email string
|
||||
}
|
||||
|
||||
// IsErrEmailAddressNotExist checks if an error is an ErrEmailAddressNotExist
|
||||
func IsErrEmailAddressNotExist(err error) bool {
|
||||
_, ok := err.(ErrEmailAddressNotExist)
|
||||
return ok
|
||||
}
|
||||
|
||||
func (err ErrEmailAddressNotExist) Error() string {
|
||||
return fmt.Sprintf("Email address does not exist [email: %s]", err.Email)
|
||||
}
|
||||
|
||||
// ErrOpenIDAlreadyUsed represents a "OpenIDAlreadyUsed" kind of error.
|
||||
type ErrOpenIDAlreadyUsed struct {
|
||||
OpenID string
|
||||
|
Reference in New Issue
Block a user