pub struct ErrorDetail {
pub category: ErrorCategory,
pub code: ErrorCode,
pub provider: Option<String>,
pub message: String,
pub raw_error: Option<String>,
pub recoverable: bool,
pub suggestion: Option<String>,
pub doc_url: Option<String>,
pub source_chain: Option<Vec<String>>,
}Expand description
Structured error detail for the response envelope.
Provides machine-readable category/code, human-readable message, provider context, recoverability flag, suggested fix, and an optional source chain for debugging.
Fields§
§category: ErrorCategoryError category for broad classification.
code: ErrorCodeMachine-readable error code.
provider: Option<String>The provider that triggered the error (if applicable).
message: StringHuman-readable error description.
raw_error: Option<String>Raw error from the backend API (for debugging).
recoverable: boolWhether the error is recoverable (retry or adjust parameters).
suggestion: Option<String>Suggested fix for the error.
doc_url: Option<String>Documentation URL for more information.
source_chain: Option<Vec<String>>Error source chain for debugging (e.g. underlying TLS/DNS/IO errors).
Each entry is the Display output of a successive .source() in the
original error chain. Only populated when the error wraps an external
library error (e.g. reqwest, serde_json).
Trait Implementations§
Source§impl Clone for ErrorDetail
impl Clone for ErrorDetail
Source§fn clone(&self) -> ErrorDetail
fn clone(&self) -> ErrorDetail
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more