From a2d8de0ce6bbd37f810bae2a697ab6221a9b3899 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 27 Mar 2022 20:05:42 +0100 Subject: [PATCH] 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 --- src/error.rs | 3 +++ 1 file changed, 3 insertions(+) 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)] -- 2.30.2