prettymuchbryce / http-status-codes

Constants enumerating the HTTP status codes. All status codes defined in RFC1945 (HTTP/1.0, RFC2616 (HTTP/1.1), and RFC2518 (WebDAV) are supported.
MIT License
1.04k stars 106 forks source link

Missing status codes for newtork failures #82

Open victorpers opened 2 years ago

victorpers commented 2 years ago

Superagent has a retry method which use the following status codes :

You will find the official documentation of this retry method here : https://visionmedia.github.io/superagent/#retrying-requests

Status codes 521, 522 and 524 are not supported by this lib, could it be possible to add them ?

angelsupp commented 1 year ago

Do we still need this? i can work on this issue

mh9ea6ec9nk4a commented 1 year ago

http-status-codes

mh9ea6ec9nk4a commented 1 year ago

Hdg

angellee177 commented 1 year ago

I have been check and confirm, here is the update:

Only left these status-code below:

cc: @victorpers , @prettymuchbryce .

prettymuchbryce commented 1 year ago

521/522/524 are all Cloudflare-specific status codes without official IETF specs. However, because of the ubiquity of Cloudflare, I am OK with adding them, but we should specify this fact in codes.json, as well we should find pertinent documentation to link there as well (even though it won't be an official spec).

angelsupp commented 1 year ago

i can work on it @prettymuchbryce . Noted, I'll add this fact in codes.json regarding the status codes without official IETF specs.