From 38f0e43125379d64c4bbe297e699d95e73319a6d Mon Sep 17 00:00:00 2001 From: George Boot <884482+georgeboot@users.noreply.github.com> Date: Wed, 18 Dec 2024 20:52:48 +0100 Subject: [PATCH] Make internal server error new fallback error type --- src/controller/mod.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/controller/mod.rs b/src/controller/mod.rs index 54c6f9870..d7ec88b6f 100644 --- a/src/controller/mod.rs +++ b/src/controller/mod.rs @@ -219,11 +219,15 @@ impl IntoResponse for Error { StatusCode::BAD_REQUEST, ErrorDetail::with_reason("Bad Request"), ) - } - _ => ( + }, + Self::BadRequest => ( StatusCode::BAD_REQUEST, ErrorDetail::with_reason("Bad Request"), ), + _ => ( + StatusCode::INTERNAL_SERVER_ERROR, + ErrorDetail::new("internal_server_error", "Internal Server Error"), + ), }; (public_facing_error.0, Json(public_facing_error.1)).into_response()