From f7e3841426ed4661ede6ccfff9c306141735d465 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Fri, 26 Sep 2025 14:35:23 +0200 Subject: refactor remuxer trait; add webm support; add back transcoding --- server/src/ui/error.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'server/src/ui') diff --git a/server/src/ui/error.rs b/server/src/ui/error.rs index 6fc3284..f1c9d3a 100644 --- a/server/src/ui/error.rs +++ b/server/src/ui/error.rs @@ -26,10 +26,11 @@ static ERROR_IMAGE: LazyLock> = LazyLock::new(|| { #[catch(default)] pub fn r_catch<'a>(status: Status, _request: &Request) -> RawHtml { + catch_with_message(format!("{status}")) +} +fn catch_with_message(message: String) -> RawHtml { RawHtml(render_page( - &ErrorPage { - status: format!("{status}"), - }, + &ErrorPage { status: message }, RenderInfo { importing: false, session: None, @@ -56,7 +57,7 @@ impl<'r> Responder<'r, 'static> for MyError { Some(x) if x.is_avif() || x.is_png() || x.is_jpeg() => { (ContentType::AVIF, ERROR_IMAGE.as_slice()).respond_to(req) } - _ => r_catch(Status::InternalServerError, req).respond_to(req), + _ => catch_with_message(format!("{:#}", self.0)).respond_to(req), } } } -- cgit v1.2.3-70-g09d2