fix asset
This commit is contained in:
parent
0a41aad937
commit
67b4400d99
|
|
@ -302,6 +302,8 @@ class AssetService:
|
|||
except ClientError as e:
|
||||
error_code = e.response.get("Error", {}).get("Code", "")
|
||||
if error_code == "NoSuchKey":
|
||||
# File not found in S3 - delete asset from database
|
||||
await self.asset_repo.delete(asset)
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_404_NOT_FOUND,
|
||||
detail="Media file not found in storage",
|
||||
|
|
|
|||
Loading…
Reference in New Issue