hopr_crypto_sphinx/
errors.rs

1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum SphinxError {
5    #[error("failed to decode packet: {0}")]
6    PacketDecodingError(String),
7
8    #[error("failed to construct packet: {0}")]
9    PacketConstructionError(String),
10
11    #[error("data could not be padded")]
12    PaddingError,
13
14    #[error(transparent)]
15    CryptoError(#[from] hopr_crypto_types::errors::CryptoError),
16
17    #[error(transparent)]
18    GeneralError(#[from] hopr_primitive_types::errors::GeneralError),
19}