| |
| use std::time::Duration; |
|
|
| |
| #[derive(Debug, Clone, thiserror::Error)] |
| pub enum Error { |
| |
| #[error("Authentication initiation failed: {0}")] |
| InitiationFailed(String), |
|
|
| |
| #[error("Authentication timed out after {0:?}")] |
| Timeout(Duration), |
|
|
| |
| #[error("Device code or session expired")] |
| Expired, |
|
|
| |
| #[error("User denied authorization")] |
| Denied, |
|
|
| |
| #[error("Polling failed: {0}")] |
| PollFailed(String), |
|
|
| |
| #[error("Authentication completion failed: {0}")] |
| CompletionFailed(String), |
|
|
| |
| #[error("Token refresh failed: {0}")] |
| RefreshFailed(String), |
|
|
| |
| #[error("Credential validation failed: {0}")] |
| ValidationFailed(String), |
|
|
| |
| #[error("Missing required parameter: {0}")] |
| MissingParameter(String), |
|
|
| |
| #[error("Invalid parameter value for '{0}': {1}")] |
| InvalidParameter(String, String), |
|
|
| |
| #[error("Invalid base URL: {0}")] |
| InvalidBaseUrl(String), |
|
|
| |
| #[error("Custom provider validation failed: {0}")] |
| CustomProviderValidationFailed(String), |
|
|
| |
| #[error("Invalid context: {0}")] |
| InvalidContext(String), |
|
|
| |
| #[error("No valid source files found to index")] |
| NoSourceFilesFound, |
| } |
|
|