From: Ian Jackson Date: Sun, 27 Mar 2022 19:05:42 +0000 (+0100) Subject: Tera templates: Add entry for rendering error to InternalError X-Git-Tag: otter-1.0.0~127 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=a2d8de0ce6bbd37f810bae2a697ab6221a9b3899;p=otter.git Tera templates: Add entry for rendering error to InternalError Template rendering errors during web page rendering were previously handled by Rocket. We are going to have to deal with them ourselves. Signed-off-by: Ian Jackson --- diff --git a/src/error.rs b/src/error.rs index 035ed65f..7b4a79ac 100644 --- a/src/error.rs +++ b/src/error.rs @@ -3,6 +3,7 @@ // There is NO WARRANTY. use crate::prelude::*; +use tera_standalone as tera; #[derive(Error,Debug)] pub enum Fatal { // Includes _bogus_ client updates, see PROTOCOL.md @@ -54,6 +55,8 @@ pub enum InternalError { Aggregated, #[error("{0}")] SshKeysManipError(#[from] sshkeys::AuthKeysManipError), + #[error("Template rendering error")] + TemplateRenderingError(#[from] tera::Error), } #[derive(Error,Copy,Clone,Debug,Serialize,Deserialize)]