http-rs / http-rs/http-types

Cloudfare status codes

Open
#507 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
209
Forks
91
PR merge metrics
No merged PRs in 30d

Description

Cloudflare seems to be defining a few custom error codes in the 5xx area. Not cool, I know.
https://support.cloudflare.com/hc/en-us/articles/115003011431-Troubleshooting-Cloudflare-5XX-errors

The `StatusCode` enum doesn't contain them, and this causes a panic in the `Response` constructor. https://github.com/http-rs/http-types/blob/main/src/status_code.rs

Is there a plan to add these error codes to the enum or to rework it in such a way that the `Response` constructor doesn't panic?

Contributor guide

Open the contributing guide

Research direction

Read status_code.rs and trace the Response constructor to reproduce how an unsupported Cloudflare 5xx code causes a panic. Done means the handling is changed as agreed—either supported by StatusCode or no longer panics—and covered by the relevant project tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.