pub use auths_core::error::AuthsErrorInfo;
use thiserror::Error;
#[derive(Debug, Error)]
#[non_exhaustive]
pub enum SdkStorageError {
#[error(transparent)]
Identity(#[from] auths_id::error::StorageError),
#[error(transparent)]
Init(#[from] auths_id::error::InitError),
#[error(transparent)]
Driver(#[from] auths_id::storage::StorageError),
#[error(transparent)]
Attestation(#[from] auths_verifier::error::AttestationError),
}
impl AuthsErrorInfo for SdkStorageError {
fn error_code(&self) -> &'static str {
match self {
Self::Identity(e) => e.error_code(),
Self::Init(e) => e.error_code(),
Self::Driver(e) => e.error_code(),
Self::Attestation(e) => e.error_code(),
}
}
fn suggestion(&self) -> Option<&'static str> {
match self {
Self::Identity(e) => e.suggestion(),
Self::Init(e) => e.suggestion(),
Self::Driver(e) => e.suggestion(),
Self::Attestation(e) => e.suggestion(),
}
}
}
pub use crate::domains::identity::error::{RegistrationError, RotationError, SetupError};
pub use crate::domains::device::error::{DeviceError, DeviceExtensionError};
pub use crate::domains::auth::error::{McpAuthError, TrustError};
pub use crate::domains::org::error::OrgError;
pub use crate::domains::compliance::error::ApprovalError;
pub use auths_core::ports::platform::PlatformError;
pub use auths_core::error::AgentError;
pub use auths_core::error::TrustError as CoreTrustError;
pub use auths_core::pairing::PairingError;
pub use auths_id::error::FreezeError;
pub use auths_id::error::InitError;
pub use auths_id::error::StorageError as IdStorageError;
pub use auths_id::storage::StorageError as IdDriverStorageError;