MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / ProviderError

Enum ProviderError

crates/opencode-provider/src/provider.rs:45–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43
44#[derive(Debug, thiserror::Error)]
45pub enum ProviderError {
46 #[error("API error (status {status_code}): {message}")]
47 ApiErrorWithStatus { message: String, status_code: u16 },
48
49 #[error("API error: {0}")]
50 ApiError(String),
51
52 #[error("Network error: {0}")]
53 NetworkError(String),
54
55 #[error("Authentication error: {0}")]
56 AuthError(String),
57
58 #[error("Rate limit exceeded")]
59 RateLimit,
60
61 #[error("Model not found: {0}")]
62 ModelNotFound(String),
63
64 #[error("Invalid request: {0}")]
65 InvalidRequest(String),
66
67 #[error("Stream error: {0}")]
68 StreamError(String),
69
70 #[error("Timeout")]
71 Timeout,
72
73 #[error("Provider not found: {0}")]
74 ProviderNotFound(String),
75
76 #[error("Configuration error: {0}")]
77 ConfigError(String),
78
79 #[error("Context overflow: {0}")]
80 ContextOverflow(String),
81}
82
83impl crate::retry::IsRetryable for ProviderError {
84 fn is_retryable(&self) -> Option<String> {

Callers 5

executeMethod · 0.85
execute_subsessionMethod · 0.85
execute_streamingMethod · 0.85
process_streamMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected