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

xuanwo pushed a commit to branch add-nextcloud-test-for-webdav
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git


The following commit(s) were added to refs/heads/add-nextcloud-test-for-webdav 
by this push:
     new b5971e23f Allow retry for locked
b5971e23f is described below

commit b5971e23f49ae0cf180fd800babdfe18de380a94
Author: Xuanwo <[email protected]>
AuthorDate: Thu Jul 13 16:45:13 2023 +0800

    Allow retry for locked
    
    Signed-off-by: Xuanwo <[email protected]>
---
 core/src/services/webdav/error.rs | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/core/src/services/webdav/error.rs 
b/core/src/services/webdav/error.rs
index 6fe6b57d4..c3110b2bc 100644
--- a/core/src/services/webdav/error.rs
+++ b/core/src/services/webdav/error.rs
@@ -31,6 +31,8 @@ pub async fn parse_error(resp: Response<IncomingAsyncBody>) 
-> Result<Error> {
     let (kind, retryable) = match parts.status {
         StatusCode::NOT_FOUND => (ErrorKind::NotFound, false),
         StatusCode::FORBIDDEN => (ErrorKind::PermissionDenied, false),
+        // Allowing retry for resource locked.
+        StatusCode::LOCKED => (ErrorKind::Unexpected, true),
         StatusCode::INTERNAL_SERVER_ERROR
         | StatusCode::BAD_GATEWAY
         | StatusCode::SERVICE_UNAVAILABLE

Reply via email to