package admin

import "errors"

// Sentinel errors emitted by Service methods. Handlers translate them
// into HTTP responses; callers in tests can match on them with
// errors.Is.
var (
	// ErrNotFound is returned when a lookup against `backend.admin_accounts`
	// matches no row. Handlers map it to HTTP 404.
	ErrNotFound = errors.New("admin: account not found")

	// ErrUsernameTaken is returned by Create when the supplied username
	// already exists. Handlers map it to HTTP 409 with code "conflict".
	ErrUsernameTaken = errors.New("admin: username already in use")

	// ErrInvalidInput is returned when a request is syntactically valid
	// but semantically rejected (empty username, empty password). Handlers
	// map it to HTTP 400.
	ErrInvalidInput = errors.New("admin: invalid input")
)
