Skip to main content

classify_anyhow_error

Function classify_anyhow_error 

Source
pub fn classify_anyhow_error(err: &Error) -> ErrorCategory
Expand description

Classify an anyhow::Error into a canonical ErrorCategory.

This uses string matching as a last resort when the original error type has been erased through anyhow wrapping. Typed conversions (e.g., From<LLMError>) should be preferred where the original error type is available.