pub type ServiceError = ToolError;Expand description
Alias for ToolError used where the error is framed as a service error.
Aliased Type§
pub struct ServiceError {
pub schema_version: u8,
pub kind: ServiceErrorKind,
pub code: String,
pub message: String,
pub retryable: bool,
pub remediation: String,
pub field: Option<String>,
pub bad_value: Option<String>,
pub expected_pattern: Option<String>,
pub reason_kind: Option<String>,
pub available_actions: Vec<&'static str>,
}Fields§
§schema_version: u8Version of the error payload schema.
kind: ServiceErrorKindHigh-level failure category.
code: StringStable machine-readable error code.
message: StringHuman-readable error message.
retryable: boolWhether the caller may retry the operation.
remediation: StringActionable guidance for resolving the error.
field: Option<String>Offending input field, when the error is field-specific.
bad_value: Option<String>The rejected value, when a specific value caused the failure.
expected_pattern: Option<String>Expected pattern the input should have matched.
reason_kind: Option<String>Sub-classification of an execution failure (the underlying kind).
available_actions: Vec<&'static str>Valid action names to suggest to the caller.