api_client: Add TooManyRequests status code
In order to be on-pair with what's we're using from micro-http, let's also add the proper status code here as well (as it will be used by `ch-remote`). Signed-off-by: Fabiano Fidêncio <fidencio@northflank.com>
This commit is contained in:
parent
d0225fe68f
commit
1968805ba2
1 changed files with 2 additions and 0 deletions
|
|
@ -32,6 +32,7 @@ pub enum StatusCode {
|
|||
NoContent,
|
||||
BadRequest,
|
||||
NotFound,
|
||||
TooManyRequests,
|
||||
InternalServerError,
|
||||
NotImplemented,
|
||||
Unknown,
|
||||
|
|
@ -45,6 +46,7 @@ impl StatusCode {
|
|||
204 => StatusCode::NoContent,
|
||||
400 => StatusCode::BadRequest,
|
||||
404 => StatusCode::NotFound,
|
||||
429 => StatusCode::TooManyRequests,
|
||||
500 => StatusCode::InternalServerError,
|
||||
501 => StatusCode::NotImplemented,
|
||||
_ => StatusCode::Unknown,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue