#[non_exhaustive]pub enum GorError {
Http(Error),
Auth(String),
NotFound(String),
RateLimit(String),
InvalidInput(String),
Io(Error),
Keyring(String),
DeviceTimeout(String),
DeviceDeclined,
}Expand description
Top-level error type for all gor operations.
Each variant corresponds to a distinct failure mode. Library code
returns these errors; command code wraps them with anyhow.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Http(Error)
An HTTP request to the GitHub API failed.
Auth(String)
Authentication failed (invalid or expired token).
NotFound(String)
The requested resource was not found (404).
RateLimit(String)
Rate limit exceeded (429 or secondary rate limit).
InvalidInput(String)
Invalid input from the user (bad repo spec, etc.).
Io(Error)
An I/O error occurred.
Keyring(String)
A keyring operation failed.
DeviceTimeout(String)
The OAuth device flow timed out waiting for user authorization.
DeviceDeclined
The OAuth device flow was declined by the user.
Trait Implementations§
Source§impl Error for GorError
impl Error for GorError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for GorError
impl !UnwindSafe for GorError
impl Freeze for GorError
impl Send for GorError
impl Sync for GorError
impl Unpin for GorError
impl UnsafeUnpin for GorError
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