Chore/more error macros (#2686)
* cleaned up MixProcessingError
* Added Error impl to (hopefully) all error enums in the codebase
* Replaced all occurences of error("{0}") with error(transparent)
* Changelog entry
This commit is contained in:
committed by
GitHub
parent
a020f2ad1c
commit
97b01db23e
@@ -20,16 +20,16 @@ pub type Result<T> = std::result::Result<T, CoconutError>;
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum CoconutError {
|
||||
#[error("{0}")]
|
||||
#[error(transparent)]
|
||||
IOError(#[from] std::io::Error),
|
||||
|
||||
#[error("{0}")]
|
||||
#[error(transparent)]
|
||||
SerdeJsonError(#[from] serde_json::Error),
|
||||
|
||||
#[error("Could not parse Ed25519 data")]
|
||||
#[error("Could not parse Ed25519 data - {0}")]
|
||||
Ed25519ParseError(#[from] Ed25519RecoveryError),
|
||||
|
||||
#[error("Could not parse X25519 data")]
|
||||
#[error("Could not parse X25519 data - {0}")]
|
||||
X25519ParseError(#[from] KeyRecoveryError),
|
||||
|
||||
#[error("Could not parse tx hash in request body")]
|
||||
|
||||
Reference in New Issue
Block a user