Skip to content

Commit

Permalink
Fix JSON error messages
Browse files Browse the repository at this point in the history
The render_response implementation was missing, so it defaulted to a
plain text error message.
  • Loading branch information
jameswestman committed Jun 18, 2022
1 parent 7bfca06 commit b6cfbe9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,4 +213,8 @@ impl ResponseError for ApiError {
}
HttpResponse::build(self.status_code()).json(self.to_json())
}

fn render_response(&self) -> HttpResponse {
self.error_response()
}
}

0 comments on commit b6cfbe9

Please sign in to comment.