pub enum Error {
MissingToken(&'static str),
Unauthorized(u16),
Api(Vec<String>),
NotFound(String),
Unexpected(String),
StaleWrite {
remote_key: String,
remote: String,
ours: String,
},
Config(String),
Http(String),
Core(Error),
Sqlite(Error),
Json(Error),
}Variants§
MissingToken(&'static str)
No API token in the environment. Named explicitly because it is by far the most common first-run failure and the fix is one line.
The remote rejected our credentials.
Api(Vec<String>)
The remote returned GraphQL-level errors. Carries their messages verbatim — they are usually actionable and we have nothing to add.
NotFound(String)
A lookup found nothing. what reads like issue ENG-412 or team ENG.
Unexpected(String)
The remote’s shape did not match what we asked for. Distinct from
Error::Api: this one means our query and our structs disagree,
which is a cliban bug rather than a user error.
StaleWrite
A local edit would clobber a newer remote change.
Config(String)
The config file exists but does not parse or does not make sense.
Http(String)
Core(Error)
Sqlite(Error)
Json(Error)
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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 Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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