| 12 | /// `CrdtError`. |
| 13 | #[derive(Debug, thiserror::Error)] |
| 14 | pub enum Error { |
| 15 | // --- Write path errors --- |
| 16 | #[error("constraint violation on {collection}: {detail}")] |
| 17 | RejectedConstraint { |
| 18 | collection: String, |
| 19 | constraint: String, |
| 20 | detail: String, |
| 21 | }, |
| 22 | |
| 23 | #[error("authorization denied for tenant {tenant_id} on {resource}")] |
| 24 | RejectedAuthz { |
| 25 | tenant_id: TenantId, |
| 26 | resource: String, |
| 27 | }, |
| 28 | |
| 29 | #[error( |
| 30 | "offset regression on stream '{stream}' group '{group}' partition {partition_id}: \ |
| 31 | attempted LSN {attempted_lsn} < current committed LSN {current_lsn}" |
| 32 | )] |
| 33 | OffsetRegression { |
| 34 | stream: String, |
| 35 | group: String, |
| 36 | partition_id: u32, |
| 37 | current_lsn: u64, |
| 38 | attempted_lsn: u64, |
| 39 | }, |
| 40 | |
| 41 | #[error("request {request_id} exceeded deadline")] |
| 42 | DeadlineExceeded { request_id: RequestId }, |
| 43 | |
| 44 | #[error("write conflict on {collection}/{document_id}, retry with idempotency key")] |
| 45 | ConflictRetry { |
| 46 | collection: String, |
| 47 | document_id: String, |
| 48 | }, |
| 49 | |
| 50 | #[error("CRDT delta pre-validation rejected: {constraint} — {reason}")] |
| 51 | RejectedPrevalidation { constraint: String, reason: String }, |
| 52 | |
| 53 | #[error("append-only violation on {collection}: {detail}")] |
| 54 | AppendOnlyViolation { collection: String, detail: String }, |
| 55 | |
| 56 | #[error("balance violation on {collection}: {detail}")] |
| 57 | BalanceViolation { collection: String, detail: String }, |
| 58 | |
| 59 | #[error("period locked on {collection}: {detail}")] |
| 60 | PeriodLocked { collection: String, detail: String }, |
| 61 | |
| 62 | #[error("retention violation on {collection}: {detail}")] |
| 63 | RetentionViolation { collection: String, detail: String }, |
| 64 | |
| 65 | #[error("legal hold active on {collection}: {detail}")] |
| 66 | LegalHoldActive { collection: String, detail: String }, |
| 67 | |
| 68 | #[error("state transition violation on {collection}: {detail}")] |
| 69 | StateTransitionViolation { collection: String, detail: String }, |
| 70 | |
| 71 | #[error("transition check violation on {collection}: {detail}")] |
no outgoing calls
no test coverage detected