-
Couldn't load subscription status.
- Fork 5
Description
Describe the bug
Errors occurring inside the do_create_collection function (e.g., OpenAI failures or S3 issues) are being caught by internal try/except blocks and only logged or returned silently via callbacks. These errors are not re-raised, so the outer create_collection route remains unaware that something went wrong. As a result, the API responds with a 200 OK and "status": "processing" even when the underlying operation failed. This issue will be there for all the endpoints of this router as the same logic of error handling is applied in the whole router's code.
To Reproduce
Steps to reproduce the behavior:
-
Trigger a failure within do_create_collection, e.g., try to upload a csv file, as csv file is not an accepted format for file search
-
Hit the /collections/create endpoint with a valid request.
-
Observe that the API returns 200 OK and metadata with "status": "processing", even though an internal failure occurred.
Expected behavior
When an exception occurs during collection creation, the error should be propagated properly so the client receives an appropriate HTTP error code (e.g., 500 for general failure, 408 for timeout), and the response should not falsely indicate that processing was successful.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status