aboutsummaryrefslogtreecommitdiffstats
path: root/src/errors.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/errors.rs')
-rw-r--r--src/errors.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/errors.rs b/src/errors.rs
index b8af25d..8264de0 100644
--- a/src/errors.rs
+++ b/src/errors.rs
@@ -32,7 +32,7 @@ pub enum ContextualError {
InvalidAuthFormat,
/// This error might occure if the hash method is neither sha256 nor sha512
- #[fail(display = "{} is not a valid hashing method. Expected sha256 or sha512", _0)]
+ #[fail(display = "Invalid hashing method {}. Expected sha256 or sha512", _0)]
InvalidHashMethod(String),
/// This error might occur if the HTTP auth hash password is not a valid hex code
@@ -64,6 +64,10 @@ pub enum ContextualError {
_0
)]
HTTPAuthenticationError(Box<ContextualError>),
+
+ /// This error might occur when an HTTP request is invalid
+ #[fail(display = "Invalid HTTP request\ncaused by: {}", _0)]
+ InvalidHTTPRequestError(String),
}
pub fn log_error_chain(description: String) {