Files
crawlab/core/errors/user.go
2024-10-20 17:22:35 +08:00

17 lines
658 B
Go

package errors
func NewUserError(msg string) (err error) {
return NewError(ErrorPrefixUser, msg)
}
var (
ErrorUserInvalidType = NewUserError("invalid type")
ErrorUserInvalidToken = NewUserError("invalid token")
ErrorUserNotExists = NewUserError("not exists")
ErrorUserAlreadyExists = NewUserError("already exists")
ErrorUserMismatch = NewUserError("mismatch")
ErrorUserMissingRequiredFields = NewUserError("missing required fields")
ErrorUserUnauthorized = NewUserError("unauthorized")
ErrorUserInvalidPassword = NewUserError("invalid password (length must be no less than 5)")
)