This is an automated email from the ASF dual-hosted git repository.

xuanwo pushed a commit to branch retry-on-rate-limited
in repository https://gitbox.apache.org/repos/asf/opendal.git

commit 4cb4de6d41e124e2b32b80e4caf9c7e2693f3bd5
Author: Xuanwo <[email protected]>
AuthorDate: Wed Jan 15 17:15:41 2025 +0800

    feat(core/services/gcs): Convert TOO_MANY_REQUESTS to retryable RateLimited
    
    Signed-off-by: Xuanwo <[email protected]>
---
 core/src/services/gcs/error.rs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/core/src/services/gcs/error.rs b/core/src/services/gcs/error.rs
index 1410c4fa0..187f0de5b 100644
--- a/core/src/services/gcs/error.rs
+++ b/core/src/services/gcs/error.rs
@@ -58,6 +58,7 @@ pub(super) fn parse_error(resp: Response<Buffer>) -> Error {
         StatusCode::PRECONDITION_FAILED | StatusCode::NOT_MODIFIED => {
             (ErrorKind::ConditionNotMatch, false)
         }
+        StatusCode::TOO_MANY_REQUESTS => (ErrorKind::RateLimited, true),
         StatusCode::INTERNAL_SERVER_ERROR
         | StatusCode::BAD_GATEWAY
         | StatusCode::SERVICE_UNAVAILABLE

Reply via email to