keybase_keystore/error.rs
1use strobe_rs::AuthError;
2use thiserror::Error;
3
4#[derive(Debug, Error)]
5pub enum Error {
6 #[error(transparent)]
7 Io(#[from] std::io::Error),
8 #[error("keystore is corrupted")]
9 Corrupted,
10 #[error("keystore is locked")]
11 Locked,
12 #[error("gen missmatch")]
13 GenMissmatch,
14 #[error("keystore is initialized")]
15 Initialized,
16}
17
18impl From<AuthError> for Error {
19 fn from(_err: AuthError) -> Self {
20 Self::Locked
21 }
22}