hopr_db_entity/
errors.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use thiserror::Error;

#[derive(Debug, Error)]
pub enum DbEntityError {
    #[error("conversion error: {0}")]
    ConversionError(String),

    #[error(transparent)]
    TypesError(#[from] hopr_internal_types::errors::CoreTypesError),

    #[error(transparent)]
    CryptoError(#[from] hopr_crypto_types::errors::CryptoError),

    #[error(transparent)]
    GeneralError(#[from] hopr_primitive_types::errors::GeneralError),
}

pub type Result<T> = std::result::Result<T, DbEntityError>;