pub type Result<T, E = Error> = ::core::result::Result<T, E>;
#[derive(Debug, thiserror::Error, strum::IntoStaticStr)]
pub enum Error {
#[error(transparent)]
CoreError(#[from] identity_core::Error),
#[error(transparent)]
DIDError(#[from] identity_did::Error),
#[error(transparent)]
CredentialError(#[from] identity_credential::Error),
#[error(transparent)]
AccountCoreError(#[from] identity_account_storage::Error),
#[error(transparent)]
IotaClientError(#[from] identity_iota_client::Error),
#[error(transparent)]
IotaCoreError(#[from] identity_iota_core::Error),
#[error("Identity not found")]
IdentityNotFound,
#[error("Update Error: {0}")]
UpdateError(#[from] crate::updates::UpdateError),
#[error("method missing fragment")]
MethodMissingFragment,
}
impl From<identity_did::did::DIDError> for Error {
fn from(error: identity_did::did::DIDError) -> Self {
identity_did::Error::from(error).into()
}
}