vtcode_llm/providers/gemini/wire/streaming/
errors.rs1use std::time::Duration;
2
3#[derive(Debug, Clone, thiserror::Error)]
5pub enum StreamingError {
6 #[error("Network error: {message}")]
8 NetworkError { message: String, is_retryable: bool },
9 #[error("API error ({status_code}): {message}")]
11 ApiError {
12 status_code: u16,
13 message: String,
14 is_retryable: bool,
15 },
16 #[error("Parse error: {message}")]
18 ParseError { message: String, raw_response: String },
19 #[error("Timeout during {operation} after {duration:?}")]
21 TimeoutError { operation: String, duration: Duration },
22 #[error("Content error: {message}")]
24 ContentError { message: String },
25 #[error("Streaming error: {message}")]
27 StreamingError {
28 message: String,
29 partial_content: Option<String>,
30 },
31}