1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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()
}
}