feat: backend service
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package user
|
||||
|
||||
import "errors"
|
||||
|
||||
// ErrAccountNotFound is returned by lookups against `backend.accounts`
|
||||
// when the row is missing or has been soft-deleted. Handlers map it to
|
||||
// HTTP 404.
|
||||
var ErrAccountNotFound = errors.New("user: account not found")
|
||||
|
||||
// ErrInvalidInput marks a request as syntactically valid but
|
||||
// semantically rejected (empty display name when the field was
|
||||
// supplied, blank time zone, etc.). Handlers map it to HTTP 400.
|
||||
var ErrInvalidInput = errors.New("user: invalid input")
|
||||
|
||||
// ErrInvalidTier is returned by ApplyEntitlement when the supplied tier
|
||||
// does not belong to the closed MVP set documented in
|
||||
// `backend/README.md`. Handlers map it to HTTP 400.
|
||||
var ErrInvalidTier = errors.New("user: invalid tier")
|
||||
|
||||
// ErrInvalidSanctionCode marks an ApplySanction request whose
|
||||
// sanction_code is not in the closed MVP set ({permanent_block}).
|
||||
var ErrInvalidSanctionCode = errors.New("user: invalid sanction code")
|
||||
|
||||
// ErrInvalidActor is returned when an admin-side mutation arrives
|
||||
// without a non-empty actor.type. The user-side mutations populate
|
||||
// actor.type internally and never produce this error.
|
||||
var ErrInvalidActor = errors.New("user: invalid actor")
|
||||
Reference in New Issue
Block a user