fix: surface partial S3 object deletion failures

This commit is contained in:
tdurieux
2026-09-06 09:18:32 +02:00
parent 4643e9f838
commit 5e84bfaa5b
3 changed files with 23 additions and 1 deletions
+7 -1
View File
@@ -102,7 +102,13 @@ export default class S3Storage extends StorageBase {
// nothing to remove
return;
}
await this.client(200000).deleteObjects(params);
const result = await this.client(200000).deleteObjects(params);
if (result.Errors?.length) {
throw new AnonymousError("storage_delete_failed", {
httpStatus: 502,
object: result.Errors,
});
}
if (data.IsTruncated) {
await this.rm(repoId, dir);