Files
mtusi2026lab2/internal/service/errors.go
T
Vladislav Agapov 87e1e5d94b
Application / verify (pull_request) Canceled after 0s
Skeleton contracts / contracts (pull_request) Canceled after 0s
fix: classify database outages and restore real HTTP fault checks
2026-10-16 10:19:46 +03:00

24 lines
793 B
Go

package service
import (
"errors"
"gitea.privcloud.tech/vlad_marlo/mtusi2026lab2/internal/store"
)
var (
// ErrUnavailable preserves the dependency failure category across service boundaries.
ErrUnavailable = store.ErrUnavailable
// ErrInvalid indicates invalid operation input.
ErrInvalid = errors.New("invalid request")
// ErrUnauthorized indicates an unresolved current user.
ErrUnauthorized = errors.New("unknown user identity")
// ErrNotFound hides both absent and inaccessible resources.
ErrNotFound = errors.New("resource not found")
// ErrConflict indicates a duplicate username.
ErrConflict = errors.New("username already exists")
// ErrCapacity indicates exhausted storage capacity without eviction.
ErrCapacity = errors.New("in-memory storage capacity reached")
)