pub enum AptuError {
Show 15 variants
GitHub {
message: String,
},
AI {
message: String,
status: Option<u16>,
provider: String,
},
NotAuthenticated,
AiProviderNotAuthenticated {
provider: String,
env_var: String,
},
RateLimited {
provider: String,
retry_after: u64,
},
TruncatedResponse {
provider: String,
},
Config {
message: String,
},
InvalidAIResponse(Error),
Network(Error),
CircuitOpen,
TypeMismatch {
number: u64,
expected: ResourceType,
actual: ResourceType,
},
ModelRegistry {
message: String,
},
ModelValidation {
model_id: String,
suggestions: String,
},
SecurityScan {
message: String,
},
InputExceedsLimit {
field: String,
actual_bytes: usize,
limit_bytes: usize,
},
}Expand description
Errors that can occur during Aptu operations.
Variants§
GitHub
GitHub API error from octocrab.
AI
AI provider error (OpenRouter, Ollama, etc.).
Fields
NotAuthenticated
User is not authenticated - needs to run aptu auth login.
AiProviderNotAuthenticated
AI provider is not authenticated - missing API key.
Fields
RateLimited
Rate limit exceeded from an AI provider.
Fields
TruncatedResponse
AI response was truncated (incomplete JSON due to EOF).
Config
Configuration file error.
InvalidAIResponse(Error)
Invalid JSON response from AI provider.
Network(Error)
Network/HTTP error from reqwest.
CircuitOpen
Circuit breaker is open - AI provider is unavailable.
TypeMismatch
Type mismatch: reference is a different type than expected.
ModelRegistry
Model registry error (runtime model validation).
ModelValidation
Model validation error - invalid model ID with suggestions.
Fields
SecurityScan
Security scan error.
InputExceedsLimit
A user-supplied input field exceeds its configured byte limit.
Trait Implementations§
Source§impl Error for AptuError
impl Error for AptuError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()