aboutsummaryrefslogtreecommitdiff
path: root/server/src/ui/error.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-09-26 14:35:23 +0200
committermetamuffin <metamuffin@disroot.org>2025-09-26 14:35:23 +0200
commitf7e3841426ed4661ede6ccfff9c306141735d465 (patch)
tree793727cc80386bc1715869a3f54986e42897e656 /server/src/ui/error.rs
parent81bb9dee3ed8a029bec831e7c3f204cd0ed41472 (diff)
downloadjellything-f7e3841426ed4661ede6ccfff9c306141735d465.tar
jellything-f7e3841426ed4661ede6ccfff9c306141735d465.tar.bz2
jellything-f7e3841426ed4661ede6ccfff9c306141735d465.tar.zst
refactor remuxer trait; add webm support; add back transcodingHEADmaster
Diffstat (limited to 'server/src/ui/error.rs')
-rw-r--r--server/src/ui/error.rs9
1 files changed, 5 insertions, 4 deletions
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<Vec<u8>> = LazyLock::new(|| {
#[catch(default)]
pub fn r_catch<'a>(status: Status, _request: &Request) -> RawHtml<String> {
+ catch_with_message(format!("{status}"))
+}
+fn catch_with_message(message: String) -> RawHtml<String> {
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),
}
}
}