ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in __call__
await self.app(scope, receive, _send)
File "/usr/local/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
raise exc
File "/usr/local/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
await self.app(scope, receive, sender)
File "/usr/local/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in __call__
raise e
File "/usr/local/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 706, in __call__
await route.handle(scope, receive, send)
INFO: 192.168.144.26:55098 - "GET /port/a5cef68e-0be8-4d5e-9aa6-cc5399951959/facility-list?limit=20 HTTP/1.1" 500 Internal Server Error
File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 276, in handle
await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 66, in app
response = await func(request)
File "/usr/local/lib/python3.10/site-packages/fastapi/routing.py", line 255, in app
content = await serialize_response(
File "/usr/local/lib/python3.10/site-packages/fastapi/routing.py", line 141, in serialize_response
raise ValidationError(errors, field.type_)
pydantic.error_wrappers.ValidationError: 6 validation errors for PortServiceListResponse
response -> data -> 0 -> serviceId
field required (type=value_error.missing)
response -> data -> 0 -> portName
field required (type=value_error.missing)
response -> data -> 0 -> serviceTypeName
field required (type=value_error.missing)
response -> data -> 1 -> serviceId
field required (type=value_error.missing)
response -> data -> 1 -> portName
field required (type=value_error.missing)
response -> data -> 1 -> serviceTypeName
field required (type=value_error.missing)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/uvicorn/protocols/http/h11_impl.py", line 407, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "/usr/local/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in __call__
return await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/site-packages/fastapi/applications.py", line 270, in __call__
await super().__call__(scope, receive, send)
File "/usr/local/lib/python3.10/site-packages/starlette/applications.py", line 124, in __call__
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.10/site-packages/starlette/middleware/errors.py", line 174, in __call__
response = await self.handler(request, exc)
File "/app/src/inf_data_service/api/exceptions.py", line 29, in default_exception
response = Response(code=500, success=False, message=f'application error: {exc.detail}')
AttributeError: 'ValidationError' object has no attribute 'detail'