mygit

[UNMAINTAINED] A cgit/webgit alternative, written in Rust
Log | Files | Refs | README | LICENSE

commit e6aa8befceeec813d1432f3c64e81e8c0923ea61
parent 15d4a68990ae874ecbe4c48a46e9b39c23fa5392
Author: Johann150 <johann@qwertqwefsday.eu>
Date:   Mon, 19 Jul 2021 17:42:27 +0200

show all erorr messages unless in release mode

Diffstat:
Msrc/errorpage.rs | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/errorpage.rs b/src/errorpage.rs @@ -27,7 +27,7 @@ impl<State: Clone + Send + Sync + 'static> Middleware<State> for ErrorToErrorpag } else { let message = match status { // don't expose 500 error - StatusCode::InternalServerError => "Internal Server Error".to_owned(), + StatusCode::InternalServerError if !cfg!(debug_assertions) => "Internal Server Error".to_owned(), _ => err.into_inner().to_string(), }; response = ErrorTemplate {