Closed KobusEllis closed 3 years ago
Would it be possible to make the errors:Error enum public so that it can be used in a warp::Filter::recover implementation?
Currently it is not possible to do something like:
use std::convert::Infallible; use warp::{Rejection, Reply}; use warp_reverse_proxy::errors::Error; pub(crate) async fn recover(rejection: Rejection) -> Result<impl Reply, Infallible> { if rejection.is_not_found() { // } else if let Some(err) = err.find::<Error> { // Handle reverse proxy errors } else { // } Ok(()) }
Definitely. Let me get back with some feedback about this 😃
Would it be possible to make the errors:Error enum public so that it can be used in a warp::Filter::recover implementation?
Currently it is not possible to do something like: