Skip to main content

catch_panic

Function catch_panic 

Source
pub fn catch_panic() -> CatchPanicLayer<ModoPanicHandler>
Expand description

Returns a layer that catches panics in handlers and returns a 500 response.

The response includes a modo::Error in its extensions for downstream middleware (such as error_handler) to inspect.