use thiserror::Error;
#[derive(Debug, Error)]
pub enum Error {
#[error("sender must have an encryption key")]
SenderMissingEncryptionKey,
#[error("recipient must have an encryption key")]
RecipientMissingEncryptionKey,
#[error("sender must have a verification key")]
SenderMissingVerificationKey,
#[error("continuation expired")]
ContinuationExpired,
#[error("continuation ID invalid")]
ContinuationIdInvalid,
#[error("peer continuation must be encrypted")]
PeerContinuationNotEncrypted,
#[error("requests must contain a peer continuation")]
MissingPeerContinuation,
#[error(transparent)]
Envelope(#[from] bc_envelope::Error),
#[error(transparent)]
XID(#[from] bc_xid::Error),
}
pub type Result<T> = std::result::Result<T, Error>;