You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by xu...@apache.org on 2023/12/06 08:41:31 UTC

(incubator-opendal) branch disable-obs-test created (now 51b515c67)

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

xuanwo pushed a change to branch disable-obs-test
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git


      at 51b515c67 Fix rate limited error

This branch includes the following new commits:

     new 51b515c67 Fix rate limited error

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(incubator-opendal) 01/01: Fix rate limited error

Posted by xu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xuanwo pushed a commit to branch disable-obs-test
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git

commit 51b515c6785e338eef3c62e483b9011e040a7656
Author: Xuanwo <gi...@xuanwo.io>
AuthorDate: Wed Dec 6 16:41:17 2023 +0800

    Fix rate limited error
    
    Signed-off-by: Xuanwo <gi...@xuanwo.io>
---
 core/src/services/b2/error.rs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/core/src/services/b2/error.rs b/core/src/services/b2/error.rs
index 2a3ead791..24b8bb183 100644
--- a/core/src/services/b2/error.rs
+++ b/core/src/services/b2/error.rs
@@ -44,6 +44,7 @@ pub async fn parse_error(resp: Response<IncomingAsyncBody>) -> Result<Error> {
         304 | 412 => (ErrorKind::ConditionNotMatch, false),
         // Service b2 could return 403, show the authorization error
         401 => (ErrorKind::PermissionDenied, true),
+        429 => (ErrorKind::RateLimited, true),
         500 | 502 | 503 | 504 => (ErrorKind::Unexpected, true),
         _ => (ErrorKind::Unexpected, false),
     };