hopr_primitive_types/
errors.rsuse serde::{Deserialize, Serialize};
use thiserror::Error;
pub type AnyError = Box<dyn std::error::Error + Send + Sync + 'static>;
#[derive(Error, Debug, Serialize, Deserialize, PartialEq)]
pub enum GeneralError {
#[error("failed to parse/deserialize the data: {0}")]
ParseError(String),
#[error("input argument to the function is invalid")]
InvalidInput,
#[error("non-specific error: {0}")]
NonSpecificError(String),
}
pub type Result<T> = core::result::Result<T, GeneralError>;