affinidi_did_key/
errors.rs1use affinidi_secrets_resolver::errors::SecretsResolverError;
2use thiserror::Error;
3
4#[derive(Error, Debug)]
6pub enum Error<'a> {
7 #[error("Invalid DID ({0}) Error: {1}")]
9 InvalidDid(&'a str, String),
10
11 #[error("Invalid DID URL ({0}) Error: {1}")]
13 InvalidDidUrl(&'a str, String),
14
15 #[error("Invalid public key length ({0})")]
17 InvalidPublicKeyLength(usize),
18
19 #[error("Invalid public key error: {0}")]
21 InvalidPublicKey(String),
22
23 #[error("Unsupported public key type: {0}")]
25 UnsupportedPublicKeyType(String),
26
27 #[error("Invalid public key type: {0}")]
29 InvalidPublicKeyType(&'a str),
30
31 #[error("Failed to generate did:key: {0}")]
33 GenerateError(#[from] SecretsResolverError),
34}