fix(backend): set error content-type to text

This commit is contained in:
Ruben Fiszel
2022-07-07 18:07:56 +02:00
parent 72c7890427
commit cf2dfd7fe7

View File

@@ -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()
}
}