nodedb_types/error/
details.rs1use serde::{Deserialize, Serialize};
4
5#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
11#[serde(tag = "kind", rename_all = "snake_case")]
12pub enum ErrorDetails {
13 ConstraintViolation {
15 collection: String,
16 },
17 WriteConflict {
18 collection: String,
19 document_id: String,
20 },
21 DeadlineExceeded,
22 PrevalidationRejected {
23 constraint: String,
24 },
25 AppendOnlyViolation {
26 collection: String,
27 },
28 BalanceViolation {
29 collection: String,
30 },
31 PeriodLocked {
32 collection: String,
33 },
34 StateTransitionViolation {
35 collection: String,
36 },
37 TransitionCheckViolation {
38 collection: String,
39 },
40 TypeGuardViolation {
41 collection: String,
42 },
43 RetentionViolation {
44 collection: String,
45 },
46 LegalHoldActive {
47 collection: String,
48 },
49 TypeMismatch {
50 collection: String,
51 },
52 Overflow {
53 collection: String,
54 },
55 InsufficientBalance {
56 collection: String,
57 },
58 RateExceeded {
59 gate: String,
60 },
61
62 CollectionNotFound {
64 collection: String,
65 },
66 DocumentNotFound {
67 collection: String,
68 document_id: String,
69 },
70 CollectionDraining {
71 collection: String,
72 },
73 CollectionDeactivated {
74 collection: String,
75 retention_expires_at_ns: u64,
79 undrop_hint: String,
83 },
84
85 PlanError,
87 FanOutExceeded {
88 shards_touched: u16,
89 limit: u16,
90 },
91 SqlNotEnabled,
92
93 AuthorizationDenied {
95 resource: String,
96 },
97 AuthExpired,
98
99 SyncConnectionFailed,
101 SyncDeltaRejected {
102 compensation: Option<crate::sync::compensation::CompensationHint>,
103 },
104 ShapeSubscriptionFailed {
105 shape_id: String,
106 },
107
108 Storage,
110 SegmentCorrupted,
111 ColdStorage,
112 Wal,
113
114 Serialization {
116 format: String,
117 },
118 Codec,
119
120 Config,
122 BadRequest,
123
124 NoLeader,
126 NotLeader {
127 leader_addr: String,
128 },
129 MigrationInProgress,
130 NodeUnreachable,
131 Cluster,
132
133 MemoryExhausted {
135 engine: String,
136 },
137
138 Encryption,
140
141 Bridge,
143 Dispatch,
144 Internal,
145}