A little app to serve my photography from my personal website

leave non-500 errors alone

+3 -1
profile.json.gz

This is a binary file and will not be displayed.

+3 -1
src/app_error.rs
··· 44 44 let is_dev = env::var("ENVIRONMENT").unwrap_or("development".to_string()) == "development"; 45 45 let body = if status_code == StatusCode::INTERNAL_SERVER_ERROR && !is_dev { 46 46 "internal server error".to_string() 47 - } else { 47 + } else if status_code == StatusCode::INTERNAL_SERVER_ERROR { 48 48 let body = if let Self::Anyhow(e) = &self 49 49 && let Some(template_error) = e.downcast_ref::<minijinja::Error>() 50 50 { ··· 60 60 }; 61 61 62 62 render_error(body) 63 + } else { 64 + self.to_string() 63 65 }; 64 66 65 67 (self.status_code(), Html(body)).into_response()