cosmian_kms_interfaces/error/
mod.rs1use thiserror::Error;
4
5pub type InterfaceResult<T> = Result<T, InterfaceError>;
6
7#[derive(Error, Debug)]
8pub enum InterfaceError {
9 #[error("{0}")]
10 Default(String),
11
12 #[error("Invalid Request: {0}")]
13 InvalidRequest(String),
14
15 #[error("Not Supported: {0}")]
16 NotSupported(String),
17
18 #[error("Unauthorized: {0}")]
19 Unauthorized(String),
20
21 #[error("HSM Error: {0}")]
22 Hsm(String),
23
24 #[error("Database Error: {0}")]
25 Db(String),
26}