use crate::crypto::CryptoError;
use crate::db::DbError;
#[derive(Debug, thiserror::Error)]
pub enum CoreError {
#[error("database error: {0}")]
Db(#[from] DbError),
#[error("crypto error: {0}")]
Crypto(#[from] CryptoError),
#[error("not an envy project (run `envy init` to initialize)")]
ManifestNotFound,
#[error("envy.toml is invalid: {0}")]
ManifestInvalid(String),
#[error("could not read/write envy.toml: {0}")]
ManifestIo(String),
#[error("invalid secret key name \"{0}\": must be non-empty and must not contain `=`")]
InvalidSecretKey(String),
}