fn handle_500_html(
        &self,
    ) -> impl Fn(warp::Rejection) -> Result<warp::http::Response<Vec<u8>>, Rejection> + Clone {
        let templates = self.handlebars.clone();

        #[derive(Serialize)]
        struct Template500Data {}
        move |err: warp::Rejection| {
            if let Some(ref err) = err.find_cause::<SmeagolError>() {
                error!("Internal error: {}", err);
                Ok(ResponseBuilder::new().status(500).body_template(
                    &templates,
                    "500.html",
                    &Template500Data {},
                )?)
            } else {
                Err(err)
            }
        }
    }
/// Returns an error recovery handler for use with `Filter.recover` in HTML pages.
///
/// If the given route rejects with a `SmeagolError` the rejection is caught and replaced with
/// a simple error 500 page.
///
/// For JSON endpoints `self.handle_500_json` can be used.
Returns an error recovery handler for use with `Filter.recover` in HTML pages.
If the given route rejects with a `SmeagolError` the rejection is caught and replaced with
a simple error 500 page.

For JSON endpoints `self.handle_500_json` can be used.
Returns an error recovery handler for use with ` Filter . recover ` in HTML pages . If the given route rejects with a ` SmeagolError ` the rejection is caught and replaced with a simple error 500 page . For JSON endpoints ` self . handle_500_json ` can be used .
fn handle_500_html(
        &self,
    ) -> impl Fn(warp::Rejection) -> Result<warp::http::Response<Vec<u8>>, Rejection> + Clone {
        let templates = self.handlebars.clone();
        #[derive(Serialize)]
        struct Template500Data {}
        move |err: warp::Rejection| {
            if let Some(ref err) = err.find_cause::<SmeagolError>() {
                error!("Internal error: {}", err);
                Ok(ResponseBuilder::new().status(500).body_template(
                    &templates,
                    "500.html",
                    &Template500Data {},
                )?)
            } else {
                Err(err)
            }
        }
    }
fn handle_500_html ( & self , ) -> impl Fn ( warp :: Rejection ) -> Result < warp :: http :: Response < Vec < u8 > > , Rejection > + Clone { let templates = self . handlebars . clone ( ) ; # [ derive ( Serialize ) ] struct Template500Data { } move | err : warp :: Rejection | { if let Some ( ref err ) = err . find_cause :: < SmeagolError > ( ) { error ! ( " " err ) ; Ok ( ResponseBuilder :: new ( ) . status ( 500 ) . body_template ( & templates , " " , & Template500Data { } , ) ? ) } else { Err ( err ) } } }
Returns an error recovery handler for use with `Filter.recover` in HTML pages.
Returns an error recovery handler for use with ` Filter . recover ` in HTML pages .
&self
&self