1use std::path::PathBuf;
2
3#[derive(Debug, thiserror::Error)]
4pub enum Error {
5 #[error("vault file already exists: {0}")]
6 AlreadyExists(PathBuf),
7
8 #[error("vault file not found: {0}")]
9 NotFound(PathBuf),
10
11 #[error("entry not found: {0}")]
12 EntryNotFound(String),
13
14 #[error("invalid password or corrupted vault")]
15 BadPassword,
16
17 #[error("kdbx error: {0}")]
18 Kdbx(String),
19
20 #[error("io error: {0}")]
21 Io(#[from] std::io::Error),
22
23 #[error("invalid entry path: {0}")]
24 InvalidPath(String),
25}