konnektoren_core/certificates/
error.rs1use thiserror::Error;
2
3#[derive(Error, Debug, PartialEq)]
4pub enum CertificateError {
5 #[error("Failed to decode certificate data")]
6 DecodingError,
7
8 #[error("Failed to deserialize certificate data: {0}")]
9 DeserializationError(String),
10
11 #[error("Failed to serialize certificate data: {0}")]
12 SerializationError(String),
13
14 #[error("Signature error: {0}")]
15 SignatureError(String),
16
17 #[error("Verification failed")]
18 VerificationFailed,
19
20 #[error("Certificate creation failed: {0}")]
21 CreationFailed(String),
22
23 #[error("Image processing error: {0}")]
24 ImageProcessingError(String),
25}
26
27pub type Result<T> = std::result::Result<T, CertificateError>;