Skip to content

Commit 4c20d6e

Browse files
committed
Special 404 error case
1 parent 8bdcd03 commit 4c20d6e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

object_store/src/azure/client.rs

+12
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,18 @@ fn parse_response_part(
387387

388388
match (id, part_response.code) {
389389
(Some(_id), Some(code)) if (200..300).contains(&code) => {}
390+
(Some(id), Some(404)) => {
391+
results[id] = Err(crate::Error::NotFound {
392+
path: paths[id].as_ref().to_string(),
393+
source: Error::DeleteFailed {
394+
path: paths[id].as_ref().to_string(),
395+
code: 404.to_string(),
396+
reason: part_response.reason.unwrap_or_default().to_string(),
397+
}
398+
.into(),
399+
}
400+
.into());
401+
}
390402
(Some(id), Some(code)) => {
391403
results[id] = Err(Error::DeleteFailed {
392404
path: paths[id].as_ref().to_string(),

0 commit comments

Comments
 (0)