1use nibkeep_crypto::CryptoError;
4
5#[derive(Debug, thiserror::Error)]
7#[non_exhaustive]
8pub enum KeysError {
9 #[error("the passphrase is wrong, or the key file was changed")]
11 WrongPassphrase,
12 #[error("the key in the keystore does not open the key file")]
14 WrongKey,
15 #[error("the key file is protected another way")]
17 WrongUnlocker,
18 #[error("the key file holds no secrets keys")]
20 NoSecrets,
21 #[error("the keystore failed: {0}")]
23 Keystore(#[from] keyring_core::Error),
24 #[error(transparent)]
26 Crypto(#[from] CryptoError),
27 #[error("the key file is damaged: {0}")]
29 Damaged(String),
30 #[error(transparent)]
32 Io(#[from] std::io::Error),
33}