mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-17 13:22:36 +00:00
clear metadata on upload failure
This commit is contained in:
parent
279736cfc4
commit
5358eaa251
2 changed files with 23 additions and 0 deletions
|
|
@ -154,6 +154,8 @@ class S3FilesImpl(Files):
|
|||
# TODO: enable server-side encryption
|
||||
)
|
||||
except ClientError as e:
|
||||
await self.sql_store.delete("openai_files", where={"id": file_id})
|
||||
|
||||
raise RuntimeError(f"Failed to upload file to S3: {e}") from e
|
||||
|
||||
return OpenAIFileObject(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue