1use thiserror::Error;
4
5pub type Result<T> = std::result::Result<T, RegistryError>;
6
7#[derive(Error, Debug)]
8pub enum RegistryError {
9 #[error("entity not found: {0}")]
10 NotFound(String),
11
12 #[error("entity already exists: {0}")]
13 AlreadyExists(String),
14
15 #[error("invalid entity ID format: {0}")]
16 InvalidId(String),
17
18 #[error("invalid key: {0}")]
19 InvalidKey(String),
20
21 #[error("signature verification failed: {0}")]
22 SignatureError(String),
23
24 #[error("token error: {0}")]
25 TokenError(String),
26
27 #[error("entity is not active: {0}")]
28 NotActive(String),
29
30 #[error("storage error: {0}")]
31 StorageError(String),
32
33 #[error("scope error: {0}")]
34 ScopeError(String),
35}