()
| 65 | |
| 66 | return _stream_file_response(full_path) |
| 67 | |
| 68 | except HTTPException: |
| 69 | raise |
| 70 | except Exception as e: |
| 71 | logger.error(f"Error occurred while getting task result: {e}") |
| 72 | raise HTTPException(status_code=500, detail="Failed to get task result") |
| 73 | |
| 74 | |
| 75 | def _completed_task(task_id): |
| 76 | task = task_manager.get_task(task_id) |
| 77 | if task is None: |
| 78 | raise HTTPException(status_code=404, detail="Task not found") |
| 79 | if task.status != TaskStatus.COMPLETED: |
| 80 | raise HTTPException(status_code=409, detail=task.error or "Task not completed") |
nothing calls this directly
no test coverage detected