The current implementation of http-types::Response::new will panic on non-standard error codes such as the 52x ones returned by Cloudflare.
It looks like instead of returning an Ok(Response::new(res.into())), the send function should first test the StatusCode with StatusCode::try_from::<u16>.
I have also created an issue in http-types.
The current implementation of http-types::Response::new will panic on non-standard error codes such as the 52x ones returned by Cloudflare.
It looks like instead of returning an
Ok(Response::new(res.into())), the send function should first test theStatusCodewithStatusCode::try_from::<u16>.I have also created an issue in http-types.