Enum WritePlaneError
pub enum WritePlaneError {
SqlSurface(StatementRunError),
Sqlite(Error),
Conflict(String),
TooLarge(String),
Capture(String),
Wire(String),
StoreFormat(String),
Divergence(String),
Backend {
status: u16,
message: String,
},
}Expand description
The one-shot write plane’s error currency (extraction plan, decision C3). Classification
into this enum happens exactly once per host — the replicator’s exhaustive
From<MasterError> — and rendering happens exactly once, in render_public_sql_error
/ render_public_script_error, so the typed public codes and the
SQLITE_ERROR/sqlite_code classification can never be collapsed into strings and
reconstructed. There is deliberately NO conversion out of this type: helpers that both
hosts and the coordinator call return BookkeepingError instead, so the one-way
promise is enforced by the type graph.
Variants§
SqlSurface(StatementRunError)
A typed failure from the public statement surface — status via
statement_sql_error_status, code/message/sqlite_code from the error itself.
Sqlite(Error)
400 SQLITE_ERROR with the extended sqlite_code.
Conflict(String)
409 TRANSACTION_CONFLICT + SQLITE_BUSY_SNAPSHOT, retry_scope “closure”,
transaction_state “closed”.
TooLarge(String)
413 RESULT_LIMIT — the one-shot rendering of the host’s transaction-size cap
(NOT TRANSACTION_TOO_LARGE; that string belongs to the session/deploy-batch codes).
Capture(String)
400 VALUE_UNSUPPORTED.
Wire(String)
400 STATEMENT_FAILED, “malformed row change: {m}”.
StoreFormat(String)
500 STATEMENT_FAILED, “store format: {m}”.
Divergence(String)
400 STATEMENT_FAILED, “silent-divergence guard: {m}”.
Backend
Host-classified everything-else, rendered STATEMENT_FAILED at the status the host
chose. Only a host’s classification (From<MasterError>) mints this — no shared
helper does, which is why no conversion out of WritePlaneError can exist.
Trait Implementations§
§impl Debug for WritePlaneError
impl Debug for WritePlaneError
§impl From<BookkeepingError> for WritePlaneError
impl From<BookkeepingError> for WritePlaneError
§fn from(error: BookkeepingError) -> WritePlaneError
fn from(error: BookkeepingError) -> WritePlaneError
Source§impl From<DdlMigrationError> for WritePlaneError
A DDL/migration failure raised here has to surface through writeplane’s public SQL
error body. The impl lives beside DdlMigrationError because it is the local type —
impl From<Local> for Foreign is what the orphan rule permits.
impl From<DdlMigrationError> for WritePlaneError
A DDL/migration failure raised here has to surface through writeplane’s public SQL
error body. The impl lives beside DdlMigrationError because it is the local type —
impl From<Local> for Foreign is what the orphan rule permits.
Source§fn from(error: DdlMigrationError) -> WritePlaneError
fn from(error: DdlMigrationError) -> WritePlaneError
§impl From<ReplicaError> for WritePlaneError
Classify failures from the WAL2 replica backend at the shared boundary. Keeping this next to
WritePlaneError means every standalone adapter uses the same public error semantics.
impl From<ReplicaError> for WritePlaneError
Classify failures from the WAL2 replica backend at the shared boundary. Keeping this next to
WritePlaneError means every standalone adapter uses the same public error semantics.