mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-27 15:10:05 +01:00
set error content type to json
This commit is contained in:
parent
1e4592dd7e
commit
f91a3bc6ab
@ -60,7 +60,9 @@ where T: ErrorCode
|
||||
impl aweb::error::ResponseError for ResponseError {
|
||||
fn error_response(&self) -> aweb::BaseHttpResponse<Body> {
|
||||
let json = serde_json::to_vec(self).unwrap();
|
||||
BaseHttpResponseBuilder::new(self.status_code()).body(json)
|
||||
BaseHttpResponseBuilder::new(self.status_code())
|
||||
.content_type("application/json")
|
||||
.body(json)
|
||||
}
|
||||
|
||||
fn status_code(&self) -> StatusCode {
|
||||
|
Loading…
x
Reference in New Issue
Block a user