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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing status codes for newtork failures

victorpers opened this issue · comments

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

  • 408
  • 413
  • 429
  • 500
  • 502
  • 503
  • 504
  • 521
  • 522
  • 524

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 ?

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

http-status-codes

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

  • 408
  • 413
  • 429
  • 500
  • 502
  • 503
  • 504

Only left these status-code below:

  • 521
  • 522
  • 524

cc: @victorpers , @prettymuchbryce .

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).

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