pub struct ApiError {
pub code: String,
pub feature: Option<String>,
pub message: String,
pub param: Option<String>,
pub request_id: Option<String>,
pub details: Option<Box<ErrorDetails>>,
}Expand description
HTTP error body used by LoonFS APIs.
Fields§
§code: StringStable machine-readable reason from the ErrorCode
registry.
Carried as a string so clients keep working when a newer server
introduces a code they do not know; use
ErrorCode::parse for typed access.
feature: Option<String>For not_supported errors, the capability-document feature key the
client should reconcile against.
message: StringHuman-readable error message.
param: Option<String>Identifies the invalid input. Body fields use JSON Pointer paths; query and path parameters use their names; CLI errors use the flag or argument as written.
request_id: Option<String>Correlation id the server assigned to the failed request; the same
value is sent as the x-request-id response header.
details: Option<Box<ErrorDetails>>Structured context for the code, present when the failure carries machine-usable identity (API spec, “Standard error contract”). Boxed so the rare detailed error does not widen every error-carrying result.