#[non_exhaustive]pub enum RegistryError {
Show 17 variants
Storage(Box<dyn Error + Sync + Send>),
InvalidPrefix {
prefix: String,
reason: String,
},
InvalidDeviceDid {
did: String,
reason: String,
},
EventExists {
prefix: String,
seq: u128,
},
SequenceGap {
prefix: String,
expected: u128,
got: u128,
},
NotFound {
entity_type: String,
id: String,
},
Serialization(Error),
ConcurrentModification(String),
SaidMismatch {
expected: String,
actual: String,
},
InvalidEvent {
reason: String,
},
Io(Error),
Internal(String),
InvalidTenantId {
tenant_id: String,
kind: TenantIdError,
},
Attestation(String),
StaleAttestation(String),
NotImplemented {
method: &'static str,
},
BatchValidationFailed {
index: usize,
source: Box<RegistryError>,
},
}Expand description
Errors that can occur during registry operations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Storage(Box<dyn Error + Sync + Send>)
Storage backend operation failed
InvalidPrefix
Invalid KERI prefix format
InvalidDeviceDid
Invalid device DID format
EventExists
Event already exists at this sequence number
SequenceGap
Sequence number gap detected
NotFound
Entity not found
Serialization(Error)
JSON serialization/deserialization error
ConcurrentModification(String)
Concurrent modification detected (CAS failure)
SaidMismatch
SAID (Self-Addressing Identifier) mismatch (computed != stored)
InvalidEvent
Invalid event structure (cannot compute SAID)
Io(Error)
I/O error
Internal(String)
Internal error
InvalidTenantId
Invalid tenant ID
Attestation(String)
Attestation validation error
StaleAttestation(String)
Stale or replayed attestation rejected
NotImplemented
Method is not yet implemented by this backend.
BatchValidationFailed
A batch operation failed validation at a specific event index.
Fields
source: Box<RegistryError>The underlying validation error.
Implementations§
Source§impl RegistryError
impl RegistryError
Sourcepub fn storage<E>(err: E) -> RegistryError
pub fn storage<E>(err: E) -> RegistryError
Create a storage error from any error type.
Use this to wrap backend-specific errors (e.g., git2::Error) in the generic Storage variant.
Sourcepub fn identity_not_found(prefix: &Prefix) -> RegistryError
pub fn identity_not_found(prefix: &Prefix) -> RegistryError
Create a not-found error for an identity.
Sourcepub fn event_not_found(prefix: &Prefix, seq: u128) -> RegistryError
pub fn event_not_found(prefix: &Prefix, seq: u128) -> RegistryError
Create a not-found error for an event.
Sourcepub fn device_not_found(did: &str) -> RegistryError
pub fn device_not_found(did: &str) -> RegistryError
Create a not-found error for a device.
Sourcepub fn org_not_found(org: &str) -> RegistryError
pub fn org_not_found(org: &str) -> RegistryError
Create a not-found error for an org.
Trait Implementations§
Source§impl AuthsErrorInfo for RegistryError
impl AuthsErrorInfo for RegistryError
Source§fn error_code(&self) -> &'static str
fn error_code(&self) -> &'static str
Source§fn suggestion(&self) -> Option<&'static str>
fn suggestion(&self) -> Option<&'static str>
Source§impl Debug for RegistryError
impl Debug for RegistryError
Source§impl Display for RegistryError
impl Display for RegistryError
Source§impl Error for RegistryError
impl Error for RegistryError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<Error> for RegistryError
impl From<Error> for RegistryError
Source§fn from(source: Error) -> RegistryError
fn from(source: Error) -> RegistryError
Source§impl From<Error> for RegistryError
impl From<Error> for RegistryError
Source§fn from(source: Error) -> RegistryError
fn from(source: Error) -> RegistryError
Auto Trait Implementations§
impl !RefUnwindSafe for RegistryError
impl !UnwindSafe for RegistryError
impl Freeze for RegistryError
impl Send for RegistryError
impl Sync for RegistryError
impl Unpin for RegistryError
impl UnsafeUnpin for RegistryError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.