about summary refs log tree commit diff
path: root/src/errors.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/errors.rs')
-rw-r--r--src/errors.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/errors.rs b/src/errors.rs
index c7c1e14f4312..9de907430d6e 100644
--- a/src/errors.rs
+++ b/src/errors.rs
@@ -30,6 +30,7 @@ use diesel;
 use r2d2;
 use reqwest;
 use tera;
+use tokio_timer;
 
 pub type Result<T> = result::Result<T, ConverseError>;
 
@@ -50,6 +51,9 @@ pub enum ConverseError {
     #[fail(display = "error occured during request handling: {}", error)]
     ActixWeb { error: actix_web::Error },
 
+    #[fail(display = "error occured running timer: {}", error)]
+    Timer { error: tokio_timer::Error },
+
     // This variant is used as a catch-all for wrapping
     // actix-web-compatible response errors, such as the errors it
     // throws itself.
@@ -99,6 +103,12 @@ impl From<reqwest::Error> for ConverseError {
     }
 }
 
+impl From<tokio_timer::Error> for ConverseError {
+    fn from(error: tokio_timer::Error) -> ConverseError {
+        ConverseError::Timer { error }
+    }
+}
+
 // Support conversion of error type into HTTP error responses:
 
 impl ResponseError for ConverseError {