Repository navigation
Expand file tree
/
Copy patherrors.go
More file actions
76 lines (62 loc) · 3.18 KB
/
Copy patherrors.go
File metadata and controls
76 lines (62 loc) · 3.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
package fabriq
import (
"github.com/xraph/fabriq/core/fabriqerr"
"github.com/xraph/fabriq/core/tenant"
)
// Sentinel errors form fabriq's typed taxonomy. Callers branch with
// errors.Is; rich variants (VersionConflictError, NotFoundError) carry
// detail and still match their sentinel. The canonical values live in core
// packages (root imports core, never the reverse) and are aliased here so
// application code uniformly writes fabriq.ErrX.
var (
// ErrNoTenant is returned for any fabric call whose context was not
// stamped with a tenant by auth middleware.
ErrNoTenant = tenant.ErrNoTenant
// ErrTenantHookTripped is returned when the grove pre-query backstop
// detects a relational query without a tenant predicate. It firing
// means a bug in fabriq itself: the structural stamping was bypassed.
ErrTenantHookTripped = tenant.ErrTenantHookTripped
// ErrNotFound is returned when an aggregate or row does not exist
// within the calling tenant's scope.
ErrNotFound = fabriqerr.ErrNotFound
// ErrVersionConflict is returned when a command's expected version
// does not match the stored aggregate version.
ErrVersionConflict = fabriqerr.ErrVersionConflict
// ErrProjectionLag is returned by WaitForProjection when the deadline
// expires before the projection catches up to the requested version.
ErrProjectionLag = fabriqerr.ErrProjectionLag
// ErrStoreNotConfigured is returned by capability ports whose backing
// store was not configured on Open (e.g. Graph() without FalkorDB).
ErrStoreNotConfigured = fabriqerr.ErrStoreNotConfigured
// ErrRawSQLUnsupported is returned by RelationalQuerier.Query on backends
// that have no raw-SQL escape hatch (e.g. the in-memory test fake).
// Callers may fall back to portable reads built from List/Get instead.
ErrRawSQLUnsupported = fabriqerr.ErrRawSQLUnsupported
)
// VersionConflictError reports an optimistic-concurrency failure.
type VersionConflictError = fabriqerr.VersionConflictError
// NotFoundError reports a missing aggregate within the tenant's scope.
type NotFoundError = fabriqerr.NotFoundError
// Error is fabriq's canonical structured error. Application code constructs and
// inspects it via this alias; the canonical definition lives in core/fabriqerr.
type Error = fabriqerr.Error
// Meta is the structured driver-detail carried by Error.
type Meta = fabriqerr.Meta
// Code is the stable machine-readable error category on Error.
type Code = fabriqerr.Code
// Code constants, re-exported so application code writes fabriq.CodeX.
const (
CodeNotFound = fabriqerr.CodeNotFound
CodeAlreadyExists = fabriqerr.CodeAlreadyExists
CodeConstraintViolation = fabriqerr.CodeConstraintViolation
CodeSchemaMismatch = fabriqerr.CodeSchemaMismatch
CodeInvalidInput = fabriqerr.CodeInvalidInput
CodeVersionConflict = fabriqerr.CodeVersionConflict
CodeUnauthorized = fabriqerr.CodeUnauthorized
CodePermissionDenied = fabriqerr.CodePermissionDenied
CodeUnavailable = fabriqerr.CodeUnavailable
CodeTimeout = fabriqerr.CodeTimeout
CodeSerialization = fabriqerr.CodeSerialization
CodeNotConfigured = fabriqerr.CodeNotConfigured
CodeInternal = fabriqerr.CodeInternal
)