diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index fc0b7ce..658a245 100644 --- a/src/main.rs +++ b/src/main.rs @@ -21,6 +21,7 @@ use serde::Deserialize; use sputnik::html_escape; use sputnik::hyper_body::FormError; use sputnik::mime; +use sputnik::request::QueryError; use sputnik::request::SputnikParts; use sputnik::response::SputnikBuilder; use std::convert::Infallible; @@ -496,6 +497,12 @@ impl From<FormError> for Error { } } +impl From<QueryError> for Error { + fn from(e: QueryError) -> Self { + Self::BadRequest(e.to_string()) + } +} + pub struct Context { repo: Repository, parts: Parts, |