From 1968805ba291ae08e07abf0ef8c0ade4cf11ab68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Fri, 25 Apr 2025 20:22:31 +0200 Subject: [PATCH] api_client: Add `TooManyRequests` status code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- api_client/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api_client/src/lib.rs b/api_client/src/lib.rs index 12a8089e1..6bc36e650 100644 --- a/api_client/src/lib.rs +++ b/api_client/src/lib.rs @@ -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,