Skip to main content

catch_panic_layer

Function catch_panic_layer 

Source
pub(crate) fn catch_panic_layer() -> CatchPanicLayer<fn(Box<dyn Any + Send + 'static>) -> Response>
Expand description

把 handler 及其内层中间件在响应头发出前的 panic 转成 500。