aboutsummaryrefslogtreecommitdiff
path: root/src/error.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs
index c9653f5a..7c648fab 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -2,6 +2,8 @@ use err_derive::Error;
use hyper::StatusCode;
use std::io;
+use crate::data::Hash;
+
#[derive(Debug, Error)]
pub enum Error {
#[error(display = "IO error: {}", _0)]
@@ -50,6 +52,9 @@ pub enum Error {
#[error(display = "Not found")]
NotFound,
+ #[error(display = "Corrupt data: does not match hash {:?}", _0)]
+ CorruptData(Hash),
+
#[error(display = "{}", _0)]
Message(String),
}