pub enum Code {
Show 27 variants
UnknownKey,
MalformedOp,
MalformedRequest,
ReviewerMismatch,
ChannelNotOwned,
NodeOnly,
AssignmentRequired,
ProtectedRef,
ReviewRequired,
RefUndeletable,
StaleHead,
ReviewState,
ProvenanceState,
ChangeState,
WorkspaceState,
IdentityState,
VouchState,
WitnessState,
PolicyUnavailable,
LogEvicted,
DuplicateSubmission,
ScopeRequired,
ForeignScope,
StaleScope,
QuotaExceeded,
BadSignature,
Unclassified,
}Expand description
Stable, machine-readable rejection reasons.
A code is a contract: clients branch on it, so renaming one is a
breaking change and adding one is not. Every variant is listed in
ERRORS.md with the action a client should take.
Variants§
UnknownKey
The signature names a key id this node has no record of. Says nothing about the signature itself, which is not checked once the key is missing.
MalformedOp
The payload did not decode as a ViewOp.
MalformedRequest
The request body was missing fields or badly encoded.
ReviewerMismatch
A verdict or comment claimed an attribution other than the signed channel.
ChannelNotOwned
The signing key is bound to a different channel name.
NodeOnly
Only the node’s own key may author this operation.
AssignmentRequired
The node assigns reviewers; a self-named list was refused.
ProtectedRef
The target ref is protected and needs a node-drawn reviewer list.
ReviewRequired
The target ref lacks the required independent approval weight.
RefUndeletable
The target ref is protected and cannot be deleted.
StaleHead
Compare-and-swap failed: the state moved under the submission.
ReviewState
A review-op precondition failed (duplicate id, unknown review, already assigned, archived).
ProvenanceState
A provenance record was missing a subject or kind.
ChangeState
A stable change was unknown, duplicated, archived, or mismatched.
WorkspaceState
A workspace lifecycle request conflicted with its durable binding.
IdentityState
A key-binding precondition failed (a key already bound to another operator, a revoked or unbound key, a channel naming a different operator).
VouchState
A vouch precondition failed (an end with no unrevoked binding, a self-vouch, an edge that already stands, or a withdrawal of one that does not).
WitnessState
A witness precondition failed (a witness with no unrevoked binding, a cosignature over anything but the latest ref-state attestation, or one that witness has already made).
The operator’s protected-ref list could not be read, so the gate failed closed.
LogEvicted
Requested log entries are older than anything this node can serve.
DuplicateSubmission
These exact signed bytes have already been admitted.
ScopeRequired
This node requires a signed scope and the op carried none.
ForeignScope
The op was signed for a different node’s log.
StaleScope
The scoped head is no longer recent enough to admit.
QuotaExceeded
A per-user quota (D37) was already full, or this request was larger than one is allowed to be.
BadSignature
The signature does not verify under the key it names, which this
node does trust. Distinct from Code::UnknownKey because the
repairs are opposites: that one widens the trusted set, this one
must not.
Unclassified
Anything that did not originate as a structured rejection.