Skip to main content

containerregistry_auth/
error.rs

1//! Error types for auth operations.
2
3use thiserror::Error;
4
5/// Errors that can occur during auth operations.
6#[derive(Debug, Error)]
7pub enum Error {
8    /// Docker config parse error.
9    #[error("config parse error: {0}")]
10    ConfigParse(String),
11
12    /// Credential helper execution failed.
13    #[error("credential helper failed: {0}")]
14    HelperFailure(String),
15
16    /// Credential helper not found.
17    #[error("credential helper not found: {0}")]
18    HelperNotFound(String),
19
20    /// Invalid credentials format.
21    #[error("invalid credentials: {0}")]
22    InvalidCredentials(String),
23
24    /// IO error.
25    #[error("io error: {0}")]
26    Io(#[from] std::io::Error),
27
28    /// JSON error.
29    #[error("json error: {0}")]
30    Json(#[from] serde_json::Error),
31}