minijinja running

This commit is contained in:
Per Stark
2024-12-18 20:37:31 +01:00
parent fa6283485c
commit 0a5e37130d
10 changed files with 1402 additions and 31 deletions

View File

@@ -68,6 +68,8 @@ pub enum ApiError {
UserNotFound,
#[error("You must provide valid credentials")]
AuthRequired,
#[error("Templating error: {0}")]
TemplatingError(#[from] minijinja::Error),
}
impl IntoResponse for ApiError {
@@ -87,6 +89,7 @@ impl IntoResponse for ApiError {
}
ApiError::RabbitMQError(_) => (StatusCode::INTERNAL_SERVER_ERROR, self.to_string()),
ApiError::FileError(_) => (StatusCode::INTERNAL_SERVER_ERROR, self.to_string()),
ApiError::TemplatingError(_) => (StatusCode::INTERNAL_SERVER_ERROR, self.to_string()),
};
(