Skip to main content

opencode_provider_manager/auth/
error.rs

1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum AuthError {
5    #[error("IO error: {0}")]
6    Io(#[from] std::io::Error),
7
8    #[error("JSON parse error: {0}")]
9    JsonParse(#[from] serde_json::Error),
10
11    #[error("Auth file not found: {path}")]
12    FileNotFound { path: String },
13
14    #[error("Invalid auth format: {0}")]
15    InvalidFormat(String),
16}
17
18pub type Result<T> = std::result::Result<T, AuthError>;