sos_server_storage/
error.rs1use sos_core::{AccountId, VaultId};
2use std::path::PathBuf;
3use thiserror::Error;
4
5#[derive(Debug, Error)]
7pub enum Error {
8 #[error("path '{0}' is not a directory")]
10 NotDirectory(PathBuf),
11
12 #[error("could not determine cache directory")]
14 NoCache,
15
16 #[error("could not find login folder for '{0}'")]
18 NoLoginFolder(AccountId),
19
20 #[error("could not find create vault event")]
24 NoVaultEvent,
25
26 #[error("identifier '{0}' does not match '{1}'")]
28 VaultIdentifierMismatch(VaultId, VaultId),
29
30 #[error(transparent)]
32 Core(#[from] sos_core::Error),
33
34 #[error(transparent)]
36 Backend(#[from] sos_backend::Error),
37
38 #[error(transparent)]
40 FileSystem(#[from] sos_filesystem::Error),
41
42 #[error(transparent)]
44 Vault(#[from] sos_vault::Error),
45
46 #[error(transparent)]
48 Protocol(#[from] sos_protocol::Error),
49
50 #[error(transparent)]
52 Sync(#[from] sos_sync::Error),
53
54 #[error(transparent)]
56 BackendStorage(#[from] sos_backend::StorageError),
57
58 #[error(transparent)]
60 Database(#[from] sos_database::Error),
61
62 #[error(transparent)]
64 Sql(#[from] sos_database::async_sqlite::Error),
65
66 #[error(transparent)]
68 Io(#[from] std::io::Error),
69}