aboutsummaryrefslogtreecommitdiff
path: root/server/src/ui/error.rs
diff options
context:
space:
mode:
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),
}
}
}