BUG: deleteObject in asset hard-delete may throw — route has no catch per-item #62
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug
DELETE /api/v1/assets/:id?hard=truecallsdeleteObject(proxy_s3_key),deleteObject(thumbnail_s3_key),deleteObject(original_s3_key)sequentially. If any one of these throws (S3 unavailable, bucket missing, key not found), the entire request fails 500 — but the previous S3 objects may already have been deleted. The asset row still exists because the SQL DELETE hasn't executed yet.Impact
NoSuchKeythrows unlessDeleteObjectCommandis idempotent — need to verify)Location
services/mam-api/src/routes/assets.js:295-301Recommended