{"timestamp": "2026-07-03T21:30:56.247685+00:00", "level": "ERROR", "logger": "app", "message": "Unhandled error on GET /api/v1/upload/extractions: 'str' object has no attribute 'value'", "method": "GET", "path": "/api/v1/upload/extractions", "status_code": 500, "filename": "main.py", "exception": "  + Exception Group Traceback (most recent call last):\n  |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\_utils.py\", line 76, in collapse_excgroups\n  |     yield\n  |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\base.py\", line 186, in __call__\n  |     async with anyio.create_task_group() as task_group:\n  |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\anyio\\_backends\\_asyncio.py\", line 811, in __aexit__\n  |     raise BaseExceptionGroup(\n  | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)\n  +-+---------------- 1 ----------------\n    | Traceback (most recent call last):\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\errors.py\", line 165, in __call__\n    |     await self.app(scope, receive, _send)\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\base.py\", line 185, in __call__\n    |     with collapse_excgroups():\n    |   File \"C:\\Users\\vishn\\AppData\\Local\\Programs\\Python\\Python312\\Lib\\contextlib.py\", line 158, in __exit__\n    |     self.gen.throw(value)\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\_utils.py\", line 82, in collapse_excgroups\n    |     raise exc\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\base.py\", line 187, in __call__\n    |     response = await self.dispatch_func(request, call_next)\n    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    |   File \"D:\\Agent\\api\\app\\main.py\", line 49, in request_logging_middleware\n    |     response = await call_next(request)\n    |                ^^^^^^^^^^^^^^^^^^^^^^^^\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\base.py\", line 163, in call_next\n    |     raise app_exc\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\base.py\", line 149, in coro\n    |     await self.app(scope, receive_or_disconnect, send_no_error)\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\cors.py\", line 85, in __call__\n    |     await self.app(scope, receive, send)\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\exceptions.py\", line 62, in __call__\n    |     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\_exception_handler.py\", line 53, in wrapped_app\n    |     raise exc\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\_exception_handler.py\", line 42, in wrapped_app\n    |     await app(scope, receive, sender)\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\routing.py\", line 715, in __call__\n    |     await self.middleware_stack(scope, receive, send)\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\routing.py\", line 735, in app\n    |     await route.handle(scope, receive, send)\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\routing.py\", line 288, in handle\n    |     await self.app(scope, receive, send)\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\routing.py\", line 76, in app\n    |     await wrap_app_handling_exceptions(app, request)(scope, receive, send)\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\_exception_handler.py\", line 53, in wrapped_app\n    |     raise exc\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\_exception_handler.py\", line 42, in wrapped_app\n    |     await app(scope, receive, sender)\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\routing.py\", line 73, in app\n    |     response = await f(request)\n    |                ^^^^^^^^^^^^^^^^\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\fastapi\\routing.py\", line 301, in app\n    |     raw_response = await run_endpoint_function(\n    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\fastapi\\routing.py\", line 214, in run_endpoint_function\n    |     return await run_in_threadpool(dependant.call, **values)\n    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\concurrency.py\", line 39, in run_in_threadpool\n    |     return await anyio.to_thread.run_sync(func, *args)\n    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\anyio\\to_thread.py\", line 63, in run_sync\n    |     return await get_async_backend().run_sync_in_worker_thread(\n    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\anyio\\_backends\\_asyncio.py\", line 2596, in run_sync_in_worker_thread\n    |     return await future\n    |            ^^^^^^^^^^^^\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\anyio\\_backends\\_asyncio.py\", line 1029, in run\n    |     result = context.run(func, *args)\n    |              ^^^^^^^^^^^^^^^^^^^^^^^^\n    |   File \"D:\\Agent\\api\\app\\api\\v1\\upload.py\", line 154, in list_extractions\n    |     items, total, new_count, existing_count = UploadService(db).list_extractions(\n    |                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    |   File \"D:\\Agent\\api\\app\\services\\upload_service.py\", line 477, in list_extractions\n    |     all_items, new_count, existing_count = self._build_extraction_list_items(\n    |                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    |   File \"D:\\Agent\\api\\app\\services\\upload_service.py\", line 433, in _build_extraction_list_items\n    |     \"status\": row.status.value,\n    |               ^^^^^^^^^^^^^^^^\n    | AttributeError: 'str' object has no attribute 'value'\n    +------------------------------------\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\errors.py\", line 165, in __call__\n    await self.app(scope, receive, _send)\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\base.py\", line 185, in __call__\n    with collapse_excgroups():\n  File \"C:\\Users\\vishn\\AppData\\Local\\Programs\\Python\\Python312\\Lib\\contextlib.py\", line 158, in __exit__\n    self.gen.throw(value)\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\_utils.py\", line 82, in collapse_excgroups\n    raise exc\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\base.py\", line 187, in __call__\n    response = await self.dispatch_func(request, call_next)\n               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"D:\\Agent\\api\\app\\main.py\", line 49, in request_logging_middleware\n    response = await call_next(request)\n               ^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\base.py\", line 163, in call_next\n    raise app_exc\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\base.py\", line 149, in coro\n    await self.app(scope, receive_or_disconnect, send_no_error)\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\cors.py\", line 85, in __call__\n    await self.app(scope, receive, send)\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\exceptions.py\", line 62, in __call__\n    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\_exception_handler.py\", line 53, in wrapped_app\n    raise exc\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\_exception_handler.py\", line 42, in wrapped_app\n    await app(scope, receive, sender)\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\routing.py\", line 715, in __call__\n    await self.middleware_stack(scope, receive, send)\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\routing.py\", line 735, in app\n    await route.handle(scope, receive, send)\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\routing.py\", line 288, in handle\n    await self.app(scope, receive, send)\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\routing.py\", line 76, in app\n    await wrap_app_handling_exceptions(app, request)(scope, receive, send)\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\_exception_handler.py\", line 53, in wrapped_app\n    raise exc\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\_exception_handler.py\", line 42, in wrapped_app\n    await app(scope, receive, sender)\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\routing.py\", line 73, in app\n    response = await f(request)\n               ^^^^^^^^^^^^^^^^\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\fastapi\\routing.py\", line 301, in app\n    raw_response = await run_endpoint_function(\n                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\fastapi\\routing.py\", line 214, in run_endpoint_function\n    return await run_in_threadpool(dependant.call, **values)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\concurrency.py\", line 39, in run_in_threadpool\n    return await anyio.to_thread.run_sync(func, *args)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\anyio\\to_thread.py\", line 63, in run_sync\n    return await get_async_backend().run_sync_in_worker_thread(\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\anyio\\_backends\\_asyncio.py\", line 2596, in run_sync_in_worker_thread\n    return await future\n           ^^^^^^^^^^^^\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\anyio\\_backends\\_asyncio.py\", line 1029, in run\n    result = context.run(func, *args)\n             ^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"D:\\Agent\\api\\app\\api\\v1\\upload.py\", line 154, in list_extractions\n    items, total, new_count, existing_count = UploadService(db).list_extractions(\n                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"D:\\Agent\\api\\app\\services\\upload_service.py\", line 477, in list_extractions\n    all_items, new_count, existing_count = self._build_extraction_list_items(\n                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"D:\\Agent\\api\\app\\services\\upload_service.py\", line 433, in _build_extraction_list_items\n    \"status\": row.status.value,\n              ^^^^^^^^^^^^^^^^\nAttributeError: 'str' object has no attribute 'value'"}
{"timestamp": "2026-07-03T21:31:32.616275+00:00", "level": "ERROR", "logger": "app", "message": "Unhandled error on GET /api/v1/upload/extractions: 'str' object has no attribute 'value'", "method": "GET", "path": "/api/v1/upload/extractions", "status_code": 500, "filename": "main.py", "exception": "  + Exception Group Traceback (most recent call last):\n  |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\_utils.py\", line 76, in collapse_excgroups\n  |     yield\n  |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\base.py\", line 186, in __call__\n  |     async with anyio.create_task_group() as task_group:\n  |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\anyio\\_backends\\_asyncio.py\", line 811, in __aexit__\n  |     raise BaseExceptionGroup(\n  | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)\n  +-+---------------- 1 ----------------\n    | Traceback (most recent call last):\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\errors.py\", line 165, in __call__\n    |     await self.app(scope, receive, _send)\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\base.py\", line 185, in __call__\n    |     with collapse_excgroups():\n    |   File \"C:\\Users\\vishn\\AppData\\Local\\Programs\\Python\\Python312\\Lib\\contextlib.py\", line 158, in __exit__\n    |     self.gen.throw(value)\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\_utils.py\", line 82, in collapse_excgroups\n    |     raise exc\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\base.py\", line 187, in __call__\n    |     response = await self.dispatch_func(request, call_next)\n    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    |   File \"D:\\Agent\\api\\app\\main.py\", line 49, in request_logging_middleware\n    |     response = await call_next(request)\n    |                ^^^^^^^^^^^^^^^^^^^^^^^^\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\base.py\", line 163, in call_next\n    |     raise app_exc\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\base.py\", line 149, in coro\n    |     await self.app(scope, receive_or_disconnect, send_no_error)\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\cors.py\", line 85, in __call__\n    |     await self.app(scope, receive, send)\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\exceptions.py\", line 62, in __call__\n    |     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\_exception_handler.py\", line 53, in wrapped_app\n    |     raise exc\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\_exception_handler.py\", line 42, in wrapped_app\n    |     await app(scope, receive, sender)\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\routing.py\", line 715, in __call__\n    |     await self.middleware_stack(scope, receive, send)\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\routing.py\", line 735, in app\n    |     await route.handle(scope, receive, send)\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\routing.py\", line 288, in handle\n    |     await self.app(scope, receive, send)\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\routing.py\", line 76, in app\n    |     await wrap_app_handling_exceptions(app, request)(scope, receive, send)\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\_exception_handler.py\", line 53, in wrapped_app\n    |     raise exc\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\_exception_handler.py\", line 42, in wrapped_app\n    |     await app(scope, receive, sender)\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\routing.py\", line 73, in app\n    |     response = await f(request)\n    |                ^^^^^^^^^^^^^^^^\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\fastapi\\routing.py\", line 301, in app\n    |     raw_response = await run_endpoint_function(\n    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\fastapi\\routing.py\", line 214, in run_endpoint_function\n    |     return await run_in_threadpool(dependant.call, **values)\n    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\concurrency.py\", line 39, in run_in_threadpool\n    |     return await anyio.to_thread.run_sync(func, *args)\n    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\anyio\\to_thread.py\", line 63, in run_sync\n    |     return await get_async_backend().run_sync_in_worker_thread(\n    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\anyio\\_backends\\_asyncio.py\", line 2596, in run_sync_in_worker_thread\n    |     return await future\n    |            ^^^^^^^^^^^^\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\anyio\\_backends\\_asyncio.py\", line 1029, in run\n    |     result = context.run(func, *args)\n    |              ^^^^^^^^^^^^^^^^^^^^^^^^\n    |   File \"D:\\Agent\\api\\app\\api\\v1\\upload.py\", line 154, in list_extractions\n    |     items, total, new_count, existing_count = UploadService(db).list_extractions(\n    |                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    |   File \"D:\\Agent\\api\\app\\services\\upload_service.py\", line 477, in list_extractions\n    |     all_items, new_count, existing_count = self._build_extraction_list_items(\n    |                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    |   File \"D:\\Agent\\api\\app\\services\\upload_service.py\", line 433, in _build_extraction_list_items\n    |     \"status\": row.status.value,\n    |               ^^^^^^^^^^^^^^^^\n    | AttributeError: 'str' object has no attribute 'value'\n    +------------------------------------\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\errors.py\", line 165, in __call__\n    await self.app(scope, receive, _send)\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\base.py\", line 185, in __call__\n    with collapse_excgroups():\n  File \"C:\\Users\\vishn\\AppData\\Local\\Programs\\Python\\Python312\\Lib\\contextlib.py\", line 158, in __exit__\n    self.gen.throw(value)\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\_utils.py\", line 82, in collapse_excgroups\n    raise exc\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\base.py\", line 187, in __call__\n    response = await self.dispatch_func(request, call_next)\n               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"D:\\Agent\\api\\app\\main.py\", line 49, in request_logging_middleware\n    response = await call_next(request)\n               ^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\base.py\", line 163, in call_next\n    raise app_exc\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\base.py\", line 149, in coro\n    await self.app(scope, receive_or_disconnect, send_no_error)\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\cors.py\", line 85, in __call__\n    await self.app(scope, receive, send)\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\exceptions.py\", line 62, in __call__\n    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\_exception_handler.py\", line 53, in wrapped_app\n    raise exc\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\_exception_handler.py\", line 42, in wrapped_app\n    await app(scope, receive, sender)\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\routing.py\", line 715, in __call__\n    await self.middleware_stack(scope, receive, send)\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\routing.py\", line 735, in app\n    await route.handle(scope, receive, send)\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\routing.py\", line 288, in handle\n    await self.app(scope, receive, send)\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\routing.py\", line 76, in app\n    await wrap_app_handling_exceptions(app, request)(scope, receive, send)\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\_exception_handler.py\", line 53, in wrapped_app\n    raise exc\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\_exception_handler.py\", line 42, in wrapped_app\n    await app(scope, receive, sender)\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\routing.py\", line 73, in app\n    response = await f(request)\n               ^^^^^^^^^^^^^^^^\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\fastapi\\routing.py\", line 301, in app\n    raw_response = await run_endpoint_function(\n                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\fastapi\\routing.py\", line 214, in run_endpoint_function\n    return await run_in_threadpool(dependant.call, **values)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\concurrency.py\", line 39, in run_in_threadpool\n    return await anyio.to_thread.run_sync(func, *args)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\anyio\\to_thread.py\", line 63, in run_sync\n    return await get_async_backend().run_sync_in_worker_thread(\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\anyio\\_backends\\_asyncio.py\", line 2596, in run_sync_in_worker_thread\n    return await future\n           ^^^^^^^^^^^^\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\anyio\\_backends\\_asyncio.py\", line 1029, in run\n    result = context.run(func, *args)\n             ^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"D:\\Agent\\api\\app\\api\\v1\\upload.py\", line 154, in list_extractions\n    items, total, new_count, existing_count = UploadService(db).list_extractions(\n                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"D:\\Agent\\api\\app\\services\\upload_service.py\", line 477, in list_extractions\n    all_items, new_count, existing_count = self._build_extraction_list_items(\n                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"D:\\Agent\\api\\app\\services\\upload_service.py\", line 433, in _build_extraction_list_items\n    \"status\": row.status.value,\n              ^^^^^^^^^^^^^^^^\nAttributeError: 'str' object has no attribute 'value'"}
{"timestamp": "2026-07-03T21:31:47.301357+00:00", "level": "ERROR", "logger": "app", "message": "Unhandled error on GET /api/v1/upload/extractions: 'str' object has no attribute 'value'", "method": "GET", "path": "/api/v1/upload/extractions", "status_code": 500, "filename": "main.py", "exception": "  + Exception Group Traceback (most recent call last):\n  |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\_utils.py\", line 76, in collapse_excgroups\n  |     yield\n  |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\base.py\", line 186, in __call__\n  |     async with anyio.create_task_group() as task_group:\n  |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\anyio\\_backends\\_asyncio.py\", line 811, in __aexit__\n  |     raise BaseExceptionGroup(\n  | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)\n  +-+---------------- 1 ----------------\n    | Traceback (most recent call last):\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\errors.py\", line 165, in __call__\n    |     await self.app(scope, receive, _send)\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\base.py\", line 185, in __call__\n    |     with collapse_excgroups():\n    |   File \"C:\\Users\\vishn\\AppData\\Local\\Programs\\Python\\Python312\\Lib\\contextlib.py\", line 158, in __exit__\n    |     self.gen.throw(value)\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\_utils.py\", line 82, in collapse_excgroups\n    |     raise exc\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\base.py\", line 187, in __call__\n    |     response = await self.dispatch_func(request, call_next)\n    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    |   File \"D:\\Agent\\api\\app\\main.py\", line 49, in request_logging_middleware\n    |     response = await call_next(request)\n    |                ^^^^^^^^^^^^^^^^^^^^^^^^\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\base.py\", line 163, in call_next\n    |     raise app_exc\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\base.py\", line 149, in coro\n    |     await self.app(scope, receive_or_disconnect, send_no_error)\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\cors.py\", line 85, in __call__\n    |     await self.app(scope, receive, send)\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\exceptions.py\", line 62, in __call__\n    |     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\_exception_handler.py\", line 53, in wrapped_app\n    |     raise exc\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\_exception_handler.py\", line 42, in wrapped_app\n    |     await app(scope, receive, sender)\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\routing.py\", line 715, in __call__\n    |     await self.middleware_stack(scope, receive, send)\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\routing.py\", line 735, in app\n    |     await route.handle(scope, receive, send)\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\routing.py\", line 288, in handle\n    |     await self.app(scope, receive, send)\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\routing.py\", line 76, in app\n    |     await wrap_app_handling_exceptions(app, request)(scope, receive, send)\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\_exception_handler.py\", line 53, in wrapped_app\n    |     raise exc\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\_exception_handler.py\", line 42, in wrapped_app\n    |     await app(scope, receive, sender)\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\routing.py\", line 73, in app\n    |     response = await f(request)\n    |                ^^^^^^^^^^^^^^^^\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\fastapi\\routing.py\", line 301, in app\n    |     raw_response = await run_endpoint_function(\n    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\fastapi\\routing.py\", line 214, in run_endpoint_function\n    |     return await run_in_threadpool(dependant.call, **values)\n    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\concurrency.py\", line 39, in run_in_threadpool\n    |     return await anyio.to_thread.run_sync(func, *args)\n    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\anyio\\to_thread.py\", line 63, in run_sync\n    |     return await get_async_backend().run_sync_in_worker_thread(\n    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\anyio\\_backends\\_asyncio.py\", line 2596, in run_sync_in_worker_thread\n    |     return await future\n    |            ^^^^^^^^^^^^\n    |   File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\anyio\\_backends\\_asyncio.py\", line 1029, in run\n    |     result = context.run(func, *args)\n    |              ^^^^^^^^^^^^^^^^^^^^^^^^\n    |   File \"D:\\Agent\\api\\app\\api\\v1\\upload.py\", line 154, in list_extractions\n    |     items, total, new_count, existing_count = UploadService(db).list_extractions(\n    |                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    |   File \"D:\\Agent\\api\\app\\services\\upload_service.py\", line 477, in list_extractions\n    |     all_items, new_count, existing_count = self._build_extraction_list_items(\n    |                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    |   File \"D:\\Agent\\api\\app\\services\\upload_service.py\", line 433, in _build_extraction_list_items\n    |     \"status\": row.status.value,\n    |               ^^^^^^^^^^^^^^^^\n    | AttributeError: 'str' object has no attribute 'value'\n    +------------------------------------\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\errors.py\", line 165, in __call__\n    await self.app(scope, receive, _send)\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\base.py\", line 185, in __call__\n    with collapse_excgroups():\n  File \"C:\\Users\\vishn\\AppData\\Local\\Programs\\Python\\Python312\\Lib\\contextlib.py\", line 158, in __exit__\n    self.gen.throw(value)\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\_utils.py\", line 82, in collapse_excgroups\n    raise exc\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\base.py\", line 187, in __call__\n    response = await self.dispatch_func(request, call_next)\n               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"D:\\Agent\\api\\app\\main.py\", line 49, in request_logging_middleware\n    response = await call_next(request)\n               ^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\base.py\", line 163, in call_next\n    raise app_exc\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\base.py\", line 149, in coro\n    await self.app(scope, receive_or_disconnect, send_no_error)\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\cors.py\", line 85, in __call__\n    await self.app(scope, receive, send)\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\middleware\\exceptions.py\", line 62, in __call__\n    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\_exception_handler.py\", line 53, in wrapped_app\n    raise exc\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\_exception_handler.py\", line 42, in wrapped_app\n    await app(scope, receive, sender)\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\routing.py\", line 715, in __call__\n    await self.middleware_stack(scope, receive, send)\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\routing.py\", line 735, in app\n    await route.handle(scope, receive, send)\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\routing.py\", line 288, in handle\n    await self.app(scope, receive, send)\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\routing.py\", line 76, in app\n    await wrap_app_handling_exceptions(app, request)(scope, receive, send)\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\_exception_handler.py\", line 53, in wrapped_app\n    raise exc\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\_exception_handler.py\", line 42, in wrapped_app\n    await app(scope, receive, sender)\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\routing.py\", line 73, in app\n    response = await f(request)\n               ^^^^^^^^^^^^^^^^\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\fastapi\\routing.py\", line 301, in app\n    raw_response = await run_endpoint_function(\n                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\fastapi\\routing.py\", line 214, in run_endpoint_function\n    return await run_in_threadpool(dependant.call, **values)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\starlette\\concurrency.py\", line 39, in run_in_threadpool\n    return await anyio.to_thread.run_sync(func, *args)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\anyio\\to_thread.py\", line 63, in run_sync\n    return await get_async_backend().run_sync_in_worker_thread(\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\anyio\\_backends\\_asyncio.py\", line 2596, in run_sync_in_worker_thread\n    return await future\n           ^^^^^^^^^^^^\n  File \"D:\\Agent\\api\\venv\\Lib\\site-packages\\anyio\\_backends\\_asyncio.py\", line 1029, in run\n    result = context.run(func, *args)\n             ^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"D:\\Agent\\api\\app\\api\\v1\\upload.py\", line 154, in list_extractions\n    items, total, new_count, existing_count = UploadService(db).list_extractions(\n                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"D:\\Agent\\api\\app\\services\\upload_service.py\", line 477, in list_extractions\n    all_items, new_count, existing_count = self._build_extraction_list_items(\n                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"D:\\Agent\\api\\app\\services\\upload_service.py\", line 433, in _build_extraction_list_items\n    \"status\": row.status.value,\n              ^^^^^^^^^^^^^^^^\nAttributeError: 'str' object has no attribute 'value'"}
