async fn error_handler(err: routerify::Error, _: RequestInfo) -> Response {
    let err = anyhow!(err);
    log::error!("{:?}", err);
    http::Response::builder()
        .status(http::StatusCode::INTERNAL_SERVER_ERROR)
        .body(Body::from(format!("Something went wrong: {:?}", err)))
        .unwrap()
}
// Define an error handler function which will accept the `routerify::Error`
// and the request information and generates an appropriate response.
Define an error handler function which will accept the `routerify::Error`
and the request information and generates an appropriate response.
Define an error handler function which will accept the ` routerify :: Error ` and the request information and generates an appropriate response .
async fn error_handler(err: routerify::Error, _: RequestInfo) -> Response {
    let err = anyhow!(err);
    log::error!("{:?}", err);
    http::Response::builder()
        .status(http::StatusCode::INTERNAL_SERVER_ERROR)
        .body(Body::from(format!("Something went wrong: {:?}", err)))
        .unwrap()
}
async fn error_handler ( err : routerify :: Error , _ : RequestInfo ) -> Response { let err = anyhow ! ( err ) ; log :: error ! ( " " err ) ; http :: Response :: builder ( ) . status ( http :: StatusCode :: INTERNAL_SERVER_ERROR ) . body ( Body :: from ( format ! ( " " err ) ) ) . unwrap ( ) }
Define an error handler function which will accept the `routerify::Error`
and the request information and generates an appropriate response.
Define an error handler function which will accept the ` routerify :: Error ` and the request information and generates an appropriate response .
err
RequestInfo
err
RequestInfo