pub enum GogError {
AuthRequired {
service: String,
email: String,
client: Option<String>,
},
RateLimited {
retry_after: Option<Duration>,
retries: u32,
},
CircuitBreakerOpen,
QuotaExceeded {
resource: Option<String>,
},
NotFound {
resource: String,
id: Option<String>,
},
PermissionDenied {
resource: Option<String>,
action: Option<String>,
},
GoogleApi {
code: u16,
message: String,
reason: Option<String>,
},
UserFacing(String),
Usage(String),
Config(ConfigError),
Io(Error),
Other(Error),
}Variants§
AuthRequired
Authentication required for a service/account.
RateLimited
Rate limit exceeded.
CircuitBreakerOpen
Circuit breaker tripped.
QuotaExceeded
API quota exceeded.
NotFound
Resource not found.
PermissionDenied
Permission denied.
GoogleApi
Google API error (HTTP status code + message).
UserFacing(String)
User-facing message with optional cause. NOTE: String is not an Error so thiserror won’t auto-treat it as source.
Usage(String)
CLI usage error.
Config(ConfigError)
Config error.
Io(Error)
IO error.
Other(Error)
Catch-all.
Implementations§
Trait Implementations§
Source§impl Error for GogError
impl Error for GogError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<ConfigError> for GogError
impl From<ConfigError> for GogError
Source§fn from(source: ConfigError) -> Self
fn from(source: ConfigError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for GogError
impl !RefUnwindSafe for GogError
impl Send for GogError
impl Sync for GogError
impl Unpin for GogError
impl UnsafeUnpin for GogError
impl !UnwindSafe for GogError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more