pub type ErrorHandler<E> = dyn Fn(&mut Request, &RequestError<E>) + Send + Sync;
Error handler function.