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:
Jędrzej Stuczyński
2022-12-13 17:42:11 +00:00
committed by GitHub
parent a020f2ad1c
commit 97b01db23e
94 changed files with 583 additions and 714 deletions
+4 -4
View File
@@ -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")]