Error handler for a 404 Page not found error.
(res: ServiceResponse<B>)
| 58 | ErrorHandlers::new().handler(StatusCode::NOT_FOUND, not_found) |
| 59 | } |
| 60 | |
| 61 | // Error handler for a 404 Page not found error. |
| 62 | fn not_found<B>(res: ServiceResponse<B>) -> Result<ErrorHandlerResponse<BoxBody>> { |
| 63 | let response = get_error_response(&res, "Page not found"); |
| 64 | Ok(ErrorHandlerResponse::Response(ServiceResponse::new( |
| 65 | res.into_parts().0, |
| 66 | response.map_into_left_body(), |
| 67 | ))) |
| 68 | } |
| 69 |
nothing calls this directly
no test coverage detected