pub trait Catcher: Send + Sync + 'static {
    fn catch(&self, req: &Request, depot: &Depot, res: &mut Response) -> bool;
}
Expand description

Catch http response error.

Required Methods§

If the current catcher caught the error, it will returns true.

If current catcher is not interested in current error, it will returns false. Salvo will try to use next catcher to catch this error.

If all custom catchers can not catch this error, CatcherImpl will be used to catch it.

Implementors§