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

hoslo pushed a commit to branch fix-chainsafe-423
in repository https://gitbox.apache.org/repos/asf/opendal.git

commit 2cf0cd777c4fe09fa94c72113a3516d0b137d300
Author: Xuanwo <[email protected]>
AuthorDate: Mon Feb 5 11:35:12 2024 +0800

    fix(services/chainsafe): fix 423 http status
---
 core/src/services/chainsafe/error.rs | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/core/src/services/chainsafe/error.rs 
b/core/src/services/chainsafe/error.rs
index 5df3cebb3c..f998b625a4 100644
--- a/core/src/services/chainsafe/error.rs
+++ b/core/src/services/chainsafe/error.rs
@@ -46,6 +46,10 @@ pub async fn parse_error(resp: Response<IncomingAsyncBody>) 
-> Result<Error> {
         401 | 403 => (ErrorKind::PermissionDenied, false),
         404 => (ErrorKind::NotFound, false),
         304 | 412 => (ErrorKind::ConditionNotMatch, false),
+        // https://github.com/apache/opendal/issues/4146
+        // https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/423
+        // We should retry it when we get 423 error.
+        423 => (ErrorKind::RateLimited, true),
         // Service like Upyun could return 499 error with a message like:
         // Client Disconnect, we should retry it.
         499 => (ErrorKind::Unexpected, true),

Reply via email to