builds the actual response to send back when an error occurs
(&self)
| 20 | impl ResponseError for Error { |
| 21 | // builds the actual response to send back when an error occurs |
| 22 | fn error_response(&self) -> HttpResponse { |
| 23 | let err_json = serde_json::json!({ "error": self.msg }); |
| 24 | HttpResponse::build(StatusCode::from_u16(self.status).unwrap()).json(err_json) |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | async fn index() -> Result<HttpResponse, Error> { |
nothing calls this directly
no outgoing calls
no test coverage detected