Open mihai-dinculescu opened 1 year ago
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>.
Ok(Response::new(res.into()))
StatusCode
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 theStatusCode
withStatusCode::try_from::<u16>
.I have also created an issue in http-types.