===== Application Startup at 2025-12-15 11:48:18 ===== INFO: Started server process [7] INFO: Waiting for application startup. INFO: 2025-12-15T11:48:31 - app.main: ============================================================ INFO: 2025-12-15T11:48:31 - app.main: 🚀 SwiftOps API v1.0.0 | PRODUCTION INFO: 2025-12-15T11:48:31 - app.main: 📊 Dashboard: Enabled INFO: 2025-12-15T11:48:31 - app.main: ============================================================ INFO: 2025-12-15T11:48:31 - app.main: 📦 Database: INFO: 2025-12-15T11:48:31 - app.main: ✓ Connected | 45 tables | 6 users INFO: 2025-12-15T11:48:31 - app.main: 💾 Cache & Sessions: INFO: 2025-12-15T11:48:32 - app.services.otp_service: ✅ OTP Service initialized with Redis storage INFO: 2025-12-15T11:48:33 - app.main: ✓ Redis: Connected INFO: 2025-12-15T11:48:33 - app.main: 🔌 External Services: INFO: 2025-12-15T11:48:34 - app.main: ✓ Cloudinary: Connected INFO: 2025-12-15T11:48:34 - app.main: ✓ Resend: Configured INFO: 2025-12-15T11:48:34 - app.main: ○ WASender: Disconnected INFO: 2025-12-15T11:48:34 - app.main: ✓ Supabase: Connected | 6 buckets INFO: 2025-12-15T11:48:34 - app.main: ============================================================ INFO: 2025-12-15T11:48:34 - app.main: ✅ Startup complete | Ready to serve requests INFO: 2025-12-15T11:48:34 - app.main: ============================================================ INFO: Application startup complete. INFO: Uvicorn running on http://0.0.0.0:7860 (Press CTRL+C to quit) INFO: 10.16.25.209:36401 - "GET /health HTTP/1.1" 200 OK INFO: 2025-12-15T11:48:50 - app.services.invoice_generation_service: Applying tiered pricing for 1 tickets INFO: 2025-12-15T11:48:50 - app.services.invoice_generation_service: Generated invoice INV-TEL-2025-00004 for 1 tickets by user nadina73@nembors.com INFO: 10.16.25.209:36401 - "POST /api/v1/invoices/generate HTTP/1.1" 200 OK INFO: 10.16.13.79:42235 - "GET /api/v1/invoices/available-tickets?project_id=0ade6bd1-e492-4e25-b681-59f42058d29a&contractor_id=auto HTTP/1.1" 200 OK INFO: 10.16.25.209:1030 - "GET /api/v1/contractor-invoices?project_id=0ade6bd1-e492-4e25-b681-59f42058d29a HTTP/1.1" 200 OK INFO: 10.16.25.209:33496 - "GET /api/v1/contractor-invoices/7898d9a0-4a75-4477-8352-3de185dfd52a HTTP/1.1" 500 Internal Server Error ERROR: Exception in ASGI application Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 426, in run_asgi result = await app( # type: ignore[func-returns-value] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__ return await self.app(scope, receive, send) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1106, in __call__ await super().__call__(scope, receive, send) File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 122, in __call__ await self.middleware_stack(scope, receive, send) File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 184, in __call__ raise exc File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 162, in __call__ await self.app(scope, receive, _send) File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 91, in __call__ await self.simple_response(scope, receive, send, request_headers=headers) File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 146, in simple_response await self.app(scope, receive, send) File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 79, in __call__ raise exc File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 68, in __call__ await self.app(scope, receive, sender) File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in __call__ raise e File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in __call__ await self.app(scope, receive, send) File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 718, in __call__ await route.handle(scope, receive, send) File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 276, in handle await self.app(scope, receive, send) File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 66, in app response = await func(request) ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 292, in app content = await serialize_response( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 155, in serialize_response raise ResponseValidationError( fastapi.exceptions.ResponseValidationError: 1 validation errors: {'type': 'literal_error', 'loc': ('response', 'line_items', 1, 'type'), 'msg': "Input should be 'ticket', 'vehicle', 'labor', 'material' or 'other'", 'input': 'pricing_tier', 'ctx': {'expected': "'ticket', 'vehicle', 'labor', 'material' or 'other'"}, 'url': 'https://errors.pydantic.dev/2.5/v/literal_error'} INFO: 10.16.13.79:28857 - "GET /health HTTP/1.1" 200 OK INFO: 10.16.13.79:28857 - "GET /api/v1/contractor-invoices/7898d9a0-4a75-4477-8352-3de185dfd52a HTTP/1.1" 500 Internal Server Error ERROR: Exception in ASGI application Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 426, in run_asgi result = await app( # type: ignore[func-returns-value] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__ return await self.app(scope, receive, send) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1106, in __call__ await super().__call__(scope, receive, send) File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 122, in __call__ await self.middleware_stack(scope, receive, send) File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 184, in __call__ raise exc File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 162, in __call__ await self.app(scope, receive, _send) File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 91, in __call__ await self.simple_response(scope, receive, send, request_headers=headers) File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 146, in simple_response await self.app(scope, receive, send) File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 79, in __call__ raise exc File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 68, in __call__ await self.app(scope, receive, sender) File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in __call__ raise e File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in __call__ await self.app(scope, receive, send) File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 718, in __call__ await route.handle(scope, receive, send) File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 276, in handle await self.app(scope, receive, send) File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 66, in app response = await func(request) ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 292, in app content = await serialize_response( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 155, in serialize_response raise ResponseValidationError( fastapi.exceptions.ResponseValidationError: 1 validation errors: {'type': 'literal_error', 'loc': ('response', 'line_items', 1, 'type'), 'msg': "Input should be 'ticket', 'vehicle', 'labor', 'material' or 'other'", 'input': 'pricing_tier', 'ctx': {'expected': "'ticket', 'vehicle', 'labor', 'material' or 'other'"}, 'url': 'https://errors.pydantic.dev/2.5/v/literal_error'}