fix: return content-type for HTTP errors
No "Content-Type" header has ever been returned, even though the
response body has always been hard-coded to a JSON string.
This commit returns a content type of "application/json" for all
JSON-encoded HTTP errors.
@@ -127,6 +127,7 @@ impl HttpApiError {
pub fn response(&self) -> Response<Body> {
Response::builder()
.status(self.code.status_code())
+ .header("content-type", "application/json")
.body(self.body())
.unwrap()
}
