Skip to content

http-types::Response::new might panic #348

@mihai-dinculescu

Description

@mihai-dinculescu

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions