From cf2dfd7fe74956d68bdc26dc47557ea6a0ed1ce4 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Thu, 7 Jul 2022 18:07:56 +0200 Subject: [PATCH] fix(backend): set error content-type to text --- backend/src/error.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/src/error.rs b/backend/src/error.rs index 9c56d6d046..cbed14d1e2 100644 --- a/backend/src/error.rs +++ b/backend/src/error.rs @@ -63,6 +63,10 @@ impl IntoResponse for Error { _ => StatusCode::INTERNAL_SERVER_ERROR, }; tracing::error!(status = %status, error = %e, kind = "error"); - Response::builder().status(status).body(body).unwrap() + Response::builder() + .header("Content-Type", "text/plain") + .status(status) + .body(body) + .unwrap() } }