identity_iota_core/
error.rspub type Result<T, E = Error> = core::result::Result<T, E>;
#[derive(Debug, thiserror::Error, strum::IntoStaticStr)]
#[non_exhaustive]
pub enum Error {
#[error("serialization error: {0}")]
SerializationError(&'static str, #[source] Option<identity_core::Error>),
#[error("invalid did")]
DIDSyntaxError(#[source] identity_did::Error),
#[error("invalid document")]
InvalidDoc(#[source] identity_document::Error),
#[error("DID resolution failed; {0}")]
DIDResolutionError(String),
#[error("\"{0}\" is not a valid network name in the context of the `iota` did method")]
InvalidNetworkName(String),
#[error("unable to resolve a `{expected}` DID on network `{actual}`")]
NetworkMismatch {
expected: String,
actual: String,
},
#[error("invalid state metadata {0}")]
InvalidStateMetadata(&'static str),
#[cfg(feature = "revocation-bitmap")]
#[error("credential revocation error")]
RevocationError(#[source] identity_credential::revocation::RevocationError),
#[error("conversion to an OutputId failed: {0}")]
OutputIdConversionError(String),
#[cfg(all(target_arch = "wasm32", not(target_os = "wasi")))]
#[error("JavaScript function threw an exception: {0}")]
JsError(String),
#[error("jws signature verification failed")]
JwsVerificationError(#[source] identity_document::Error),
}