Expand description
Unified error categorization system for consistent error classification across VT Code.
This module provides a single canonical ErrorCategory enum that unifies the
previously separate classification systems in registry::error (8-variant ToolErrorType)
and unified_error (16-variant UnifiedErrorKind). Both systems now map through
this shared taxonomy for consistent retry decisions and error handling.
§Error Categories
Errors are divided into retryable (transient) and non-retryable (permanent) categories, with sub-classifications for specific handling strategies.
§Design Decisions
- String-based fallback is preserved only for
anyhow::Errorchains where the original type is erased. TypedFromconversions are preferred. - Policy violations are explicitly separated from OS-level permission denials.
- Rate limiting is a distinct category (not merged with network errors).
- Circuit breaker open is categorized separately for recovery flow routing.
Enums§
- Backoff
Strategy - Backoff strategy for retryable errors.
- Error
Category - Canonical error category used throughout VT Code for consistent retry decisions, user-facing messages, and error handling strategies.
- Retryability
- Describes whether and how an error can be retried.
Functions§
- classify_
anyhow_ error - Classify an
anyhow::Errorinto a canonicalErrorCategory. - classify_
error_ message - Classify an error message string into an
ErrorCategory. - is_
retryable_ llm_ error_ message - Check if an LLM error message is retryable (used by the LLM request retry loop).