From d8af2f8956effa0f2eddda15918dd5a3eb66d0b0 Mon Sep 17 00:00:00 2001 From: Georges-Antoine Assi Date: Sat, 2 Aug 2025 12:53:16 -0400 Subject: [PATCH] fix review comments --- backend/endpoints/tasks.py | 4 ++-- backend/endpoints/tests/test_tasks.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/endpoints/tasks.py b/backend/endpoints/tasks.py index 6108c993e..13cb10973 100644 --- a/backend/endpoints/tasks.py +++ b/backend/endpoints/tasks.py @@ -125,14 +125,14 @@ async def run_single_task(request: Request, task_name: str) -> MessageResponse: available_tasks = list(all_tasks.keys()) raise HTTPException( status_code=404, - detail=f"Task '{task_name}' not found. Available tasks: {', '.join(available_tasks)}", + detail=f"Task '{task_name}' not found, available tasks are {', '.join(available_tasks)}", ) task_instance = all_tasks[task_name] if not task_instance.enabled or not task_instance.manual_run: raise HTTPException( status_code=400, - detail=f"Task '{task_name}' is cannot be run", + detail=f"Task '{task_name}' cannot be run", ) low_prio_queue.enqueue(task_instance.run) diff --git a/backend/endpoints/tests/test_tasks.py b/backend/endpoints/tests/test_tasks.py index f0934c1ec..81c0f516a 100644 --- a/backend/endpoints/tests/test_tasks.py +++ b/backend/endpoints/tests/test_tasks.py @@ -293,7 +293,7 @@ class TestRunSingleTask: assert response.status_code == 404 data = response.json() assert "not found" in data["detail"].lower() - assert "Available tasks:" in data["detail"] + assert "available tasks are" in data["detail"] @patch("endpoints.tasks.low_prio_queue") @patch(