-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an HTTPException to the query endpoint to handle engine failure #22 #24 #25
Comments
🔎 Searching
I'm searching for relevant snippets in your repository. |
{"tag": "INITIAL_PLANNING", "workflow": {"tasks": [{"step": "Step 1", "name": "Import HTTPException", "action": "modify", "file": "routers/retrievers/query.py", "start_line": 1, "end_line": 1, "instructions": "At the top of the file, import HTTPException from fastapi.exceptions by adding the line 'from fastapi.exceptions import HTTPException'.", "async_score": 2, "assigned_agent": "AI", "dependencies": []}, {"step": "Step 2", "name": "Add HTTPException to query endpoint", "action": "modify", "file": "routers/retrievers/query.py", "start_line": 10, "end_line": 20, "instructions": "In the function that handles the query endpoint, add a try-except block around the code that interacts with the engine. In the except block, raise an HTTPException with status code 500 and a detail message indicating an engine failure. For example, 'except EngineFailure: raise HTTPException(status_code=500, detail='Engine failure')'.", "async_score": 8, "assigned_agent": "AI", "dependencies": ["Step 1"]}, {"step": "Step 3", "name": "Test HTTPException", "action": "create", "file": "tests/test_query.py", "start_line": 1, "end_line": 50, "instructions": "Create a new test file 'tests/test_query.py'. In this file, write tests to ensure that the HTTPException is raised correctly when the engine fails. This will involve creating a mock engine that raises an EngineFailure, and then making a request to the query endpoint and checking that the response has a status code of 500 and the correct detail message.", "async_score": 10, "assigned_agent": "User", "dependencies": ["Step 2"]}], "snippets": []}}
|
Add an HTTPException to the query endpoint to handle engine failure #22 #24
The text was updated successfully, but these errors were encountered: