15 lines
574 B
Go
15 lines
574 B
Go
package system
|
|
|
|
import (
|
|
"github.com/go-kratos/kratos/v3/errors"
|
|
)
|
|
|
|
var (
|
|
ErrUserNotFound = errors.NotFound("USER_NOT_FOUND", "user not found")
|
|
// ErrInvalidCredentials is returned for any failed login, regardless of
|
|
// whether the user exists, to avoid leaking which accounts are registered.
|
|
ErrInvalidCredentials = errors.Unauthorized("INVALID_CREDENTIALS", "invalid credentials")
|
|
ErrAuthoritiesRequired = errors.BadRequest("AUTHORITIES_REQUIRED", "at least one authority is required")
|
|
ErrUserDisabled = errors.Forbidden("USER_DISABLED", "user disabled")
|
|
)
|