#[non_exhaustive]pub enum ErrorKind {
Show 15 variants
InvalidRequest,
Unauthorized,
ContentTooLarge,
StoragePermissionDenied,
NotSupported,
NotFound,
MethodNotAllowed,
Gone,
AlreadyExists,
Conflict,
DeadlineExceeded,
Unavailable,
OutcomeUnknown,
DataCorruption,
Internal,
}Expand description
Broad error category for caller or operator action.
Each kind implies one served HTTP status (status_for_error_kind in
loonfs-server); a code’s kind and its documented status in the API spec
must agree in spirit, and the server’s spec-table sync test enforces the
composition exactly.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidRequest
Fix the request before retrying.
The request was not authorized. Fix credentials before retrying.
ContentTooLarge
The request body exceeds the deployment’s size limit for this
operation. Send a smaller payload (for uploads, prefer direct_put);
retrying unchanged will not succeed.
StoragePermissionDenied
The backing object store rejected the deployment’s credentials. The operator must fix the credentials or bucket policy before retrying.
NotSupported
The deployment does not implement this operation. Gate on the capability document instead of retrying.
NotFound
The requested object does not exist. Refresh state or choose another target.
MethodNotAllowed
The path routes somewhere, but not for this HTTP method. Fix the request; retrying unchanged will not succeed.
Gone
The target was deleted and its id is permanently retired. Do not retry; choose another target.
AlreadyExists
The create target already exists. Pick another id or treat this as idempotent.
Conflict
The request raced with current namespace state, or a caller-supplied precondition (base revision, expected head) no longer holds. Re-read fresh state, re-plan, and retry if desired.
DeadlineExceeded
The server cancelled work that exceeded its configured request deadline. Reconcile any mutation before deciding whether to retry.
Status grouping for conditions served as unavailable.
This kind is not a retry predicate: some grouped conditions require
maintenance before another attempt can succeed. Use
ErrorCode::retryable_without_operator_action for that decision.
OutcomeUnknown
The operation may have committed: its acknowledgment was lost. Retry with the same commit id or reconcile against namespace state; do not assume failure.
DataCorruption
Durable state is malformed. Treat this as operator or repair work.
Internal
LoonFS hit an internal failure. Capture details and report it.