Skip to main content

ssi_zcap_ld/
error.rs

1use thiserror::Error;
2
3/// Error type for `ssi`.
4#[derive(Error, Debug)]
5#[non_exhaustive]
6pub enum Error {
7    #[error("Missing proof")]
8    MissingProof,
9    #[error("Invalid issuer")]
10    InvalidIssuer,
11    #[error("Missing issuance date")]
12    MissingIssuanceDate,
13    #[error("Unable to convert date/time")]
14    TimeError,
15    /// Verification method id does not match JWK id
16    #[error("Verification method id does not match JWK id. VM id: {0}, JWK key id: {1}")]
17    KeyIdVMMismatch(String, String),
18    #[error(transparent)]
19    Json(#[from] serde_json::Error),
20}