ReadonlynameAlways "EnvelopeError"; what isEnvelopeError checks across module graphs.
ReadonlycodeWhich condition was raised.
ReadonlydetailsStructured information, discriminated by code.
Optional ReadonlycauseThe lower-layer error this one wraps, when any.
Staticistrue when value is an EnvelopeError (across module graphs).
StaticalreadyReturned when attempting to compress or encrypt an envelope that has already been elided.
This error occurs because an elided envelope only contains a digest reference and no longer has a subject that can be compressed or encrypted.
StaticambiguousReturned when attempting to retrieve an assertion by predicate, but multiple matching assertions exist.
For queries that expect a single result (like objectForPredicate),
having multiple matching assertions is ambiguous and requires more
specific targeting.
StaticinvalidReturned when a digest validation fails.
This can occur when unwrapping an envelope, verifying signatures, or other operations that rely on the integrity of envelope digests.
StaticinvalidReturned when an envelope's format is invalid.
This typically occurs during parsing or decoding of an envelope from CBOR.
StaticmissingReturned when a digest is expected but not found.
This can occur when working with envelope structures that require digest information, such as when working with elided envelopes.
StaticnonexistentReturned when attempting to retrieve an assertion by predicate, but no matching assertion exists.
This error occurs with functions like objectForPredicate when the
specified predicate doesn't match any assertion in the envelope.
StaticnotReturned when attempting to unwrap an envelope that wasn't wrapped.
This error occurs when calling Envelope.tryUnwrap on an
envelope that doesn't have the wrapped format.
StaticnotReturned when expecting an envelope's subject to be a leaf, but it isn't.
This error occurs when calling methods that require access to a leaf value but the envelope's subject is an assertion, node, or elided.
StaticnotReturned when expecting an envelope's subject to be an assertion, but it isn't.
This error occurs when calling methods that require an assertion structure but the envelope's subject has a different format.
StaticinvalidReturned when assertion is invalid
StaticinvalidReturned when an attachment's structure is invalid according to the Envelope Attachment specification (BCR-2023-006): the envelope is not an assertion, or its parts do not rebuild an equivalent attachment.
StaticnonexistentReturned when an attachment is requested but does not exist.
This error occurs when attempting to retrieve an attachment by ID that doesn't exist in the envelope.
StaticambiguousReturned when multiple attachments match a single query.
The message is the reference's #[error] text, misspelling included
(abiguous attachment), so both implementations report the same text.
StaticedgeReturned when an edge is missing the required 'isA' assertion.
StaticedgeReturned when an edge is missing the required 'source' assertion.
StaticedgeReturned when an edge is missing the required 'target' assertion.
StaticedgeReturned when an edge has duplicate 'isA' assertions.
StaticedgeReturned when an edge has duplicate 'source' assertions.
StaticedgeReturned when an edge has duplicate 'target' assertions.
StaticedgeReturned when an edge has an unexpected assertion (per BCR-2026-003).
StaticnonexistentReturned when an edge is requested but does not exist.
StaticambiguousReturned when multiple edges match a single query.
StaticalreadyReturned when attempting to compress an envelope that is already compressed.
This error occurs when calling compression functions on an envelope that already has compressed content, as defined in BCR-2023-005.
StaticnotReturned when attempting to decompress an envelope that is not compressed.
This error occurs when calling decompression functions on an envelope that doesn't contain compressed content.
StaticalreadyReturned when attempting to encrypt an envelope that is already encrypted or compressed.
This error occurs to prevent multiple layers of encryption or encryption of compressed data, which could reduce security, as defined in BCR-2023-004.
StaticnotReturned when attempting to decrypt an envelope that is not encrypted.
This error occurs when calling decryption functions on an envelope that doesn't contain encrypted content.
StaticnotReturned when expecting an envelope's subject to be a known value, but it isn't.
This error occurs when calling methods that require a known value (as defined in BCR-2023-003) but the envelope's subject is a different type.
StaticunknownReturned when attempting to decrypt an envelope with a recipient that doesn't match.
This error occurs when trying to use a private key to decrypt an envelope that wasn't encrypted for the corresponding public key.
StaticunknownReturned when attempting to decrypt an envelope with a secret that doesn't match.
This error occurs when trying to use a secret that does not correspond to the expected recipient, preventing successful decryption.
StaticunverifiedReturned when a signature verification fails.
This error occurs when a signature does not validate against its purported public key.
StaticinvalidReturned when the outer signature object type is not Signature.
StaticinvalidReturned when the inner signature object type is not Signature.
StaticunverifiedReturned when the inner signature is not made with the same key as the outer signature.
StaticinvalidReturned when the signature object is not a Signature.
StaticinvalidReturned when SSKR shares are invalid or insufficient for reconstruction.
This error occurs when attempting to join SSKR shares that are malformed, from different splits, or insufficient to meet the recovery threshold.
StaticsskrStaticinvalidReturned when an envelope contains an invalid type.
This error occurs when an envelope's type information doesn't match the expected format or value.
StaticambiguousReturned when an envelope contains ambiguous type information.
This error occurs when multiple type assertions exist that conflict with each other or create ambiguity about the envelope's type.
StaticsubjectReturned when the subject is expected to be the unit value but isn't.
StaticunexpectedReturned when a response envelope has an unexpected ID.
This error occurs when processing a response envelope and the ID doesn't match the expected request ID, as defined in BCR-2023-012.
StaticinvalidReturned when a response envelope is invalid.
StaticcborCbor as an internal site reports it: dcbor error: <message>, the
reference's Error::Cbor Display, with the dcbor error as cause.
Optionalcause: ErrorStaticcborCbor as a decoder reports it: the message is the dcbor Display of
cause with no prefix, because the reference's try_from_cbor_data,
TryFrom<CBOR>, from_untagged_cbor and Expression::try_from return
a dcbor::Error; cause is that CborError.
StaticcomponentsStaticinvalidInvalidParameter: parameter did not meet expected (the JS-only
input domain: a fractional position, an invalid Date, undefined).
Optionalvalue: unknownOptionalcause: ErrorStaticgeneral
The error every envelope operation throws.
codenames the condition (one ofEnvelopeErrorCode),detailsis discriminated by it, andcausecarries the underlying error when a lower layer (CBOR, components, crypto) failed.