use affinidi_secrets_resolver::errors::SecretsResolverError;
use thiserror::Error;
#[derive(Error, Debug)]
pub enum Error<'a> {
#[error("Invalid DID ({0}) Error: {1}")]
InvalidDid(&'a str, String),
#[error("Invalid DID URL ({0}) Error: {1}")]
InvalidDidUrl(&'a str, String),
#[error("Invalid public key length ({0})")]
InvalidPublicKeyLength(usize),
#[error("Invalid public key error: {0}")]
InvalidPublicKey(String),
#[error("Unsupported public key type: {0}")]
UnsupportedPublicKeyType(String),
#[error("Invalid public key type: {0}")]
InvalidPublicKeyType(&'a str),
#[error("Failed to generate did:key: {0}")]
GenerateError(#[from] SecretsResolverError),
}