class SuccessResponse(BaseModel):
    result: bool = True  class UserIn(BaseModel):
    name: str

class UserShort(UserIn):
    id: int
    api_key: str

class User(UserShort):
    followers: List[UserShort] = []
    followings: List[UserShort] = []

class UserResponse(SuccessResponse):
    user: User      |   {'type': 'missing', 'loc': ('response', 'user'), 'msg': 'Field required', 'input': <app.models.users.User object at 0x7efcba7a1880>}
    | 
    +------------------------------------

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/happy/.cache/pypoetry/virtualenvs/twitter-k29YtTKU-py3.12/lib/python3.12/site-packages/uvicorn/protocols/http/httptools_impl.py", line 411, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/happy/.cache/pypoetry/virtualenvs/twitter-k29YtTKU-py3.12/lib/python3.12/site-packages/uvicorn/middleware/proxy_headers.py", line 69, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/happy/.cache/pypoetry/virtualenvs/twitter-k29YtTKU-py3.12/lib/python3.12/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/home/happy/.cache/pypoetry/virtualenvs/twitter-k29YtTKU-py3.12/lib/python3.12/site-packages/starlette/applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/happy/.cache/pypoetry/virtualenvs/twitter-k29YtTKU-py3.12/lib/python3.12/site-packages/starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "/home/happy/.cache/pypoetry/virtualenvs/twitter-k29YtTKU-py3.12/lib/python3.12/site-packages/starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "/home/happy/.cache/pypoetry/virtualenvs/twitter-k29YtTKU-py3.12/lib/python3.12/site-packages/starlette/middleware/base.py", line 189, in __call__
    with collapse_excgroups():
  File "/usr/lib/python3.12/contextlib.py", line 158, in __exit__
    self.gen.throw(value)
  File "/home/happy/.cache/pypoetry/virtualenvs/twitter-k29YtTKU-py3.12/lib/python3.12/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    raise exc
  File "/home/happy/.cache/pypoetry/virtualenvs/twitter-k29YtTKU-py3.12/lib/python3.12/site-packages/starlette/middleware/base.py", line 191, in __call__
    response = await self.dispatch_func(request, call_next)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/happy/twitter/app/middlewares.py", line 12, in dispatch
    response = await call_next(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/happy/.cache/pypoetry/virtualenvs/twitter-k29YtTKU-py3.12/lib/python3.12/site-packages/starlette/middleware/base.py", line 165, in call_next
    raise app_exc
  File "/home/happy/.cache/pypoetry/virtualenvs/twitter-k29YtTKU-py3.12/lib/python3.12/site-packages/starlette/middleware/base.py", line 151, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "/home/happy/.cache/pypoetry/virtualenvs/twitter-k29YtTKU-py3.12/lib/python3.12/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/home/happy/.cache/pypoetry/virtualenvs/twitter-k29YtTKU-py3.12/lib/python3.12/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/home/happy/.cache/pypoetry/virtualenvs/twitter-k29YtTKU-py3.12/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/home/happy/.cache/pypoetry/virtualenvs/twitter-k29YtTKU-py3.12/lib/python3.12/site-packages/starlette/routing.py", line 756, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/happy/.cache/pypoetry/virtualenvs/twitter-k29YtTKU-py3.12/lib/python3.12/site-packages/starlette/routing.py", line 776, in app
    await route.handle(scope, receive, send)
  File "/home/happy/.cache/pypoetry/virtualenvs/twitter-k29YtTKU-py3.12/lib/python3.12/site-packages/starlette/routing.py", line 297, in handle
    await self.app(scope, receive, send)
  File "/home/happy/.cache/pypoetry/virtualenvs/twitter-k29YtTKU-py3.12/lib/python3.12/site-packages/starlette/routing.py", line 77, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/home/happy/.cache/pypoetry/virtualenvs/twitter-k29YtTKU-py3.12/lib/python3.12/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/home/happy/.cache/pypoetry/virtualenvs/twitter-k29YtTKU-py3.12/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/home/happy/.cache/pypoetry/virtualenvs/twitter-k29YtTKU-py3.12/lib/python3.12/site-packages/starlette/routing.py", line 72, in app
    response = await func(request)
               ^^^^^^^^^^^^^^^^^^^
  File "/home/happy/.cache/pypoetry/virtualenvs/twitter-k29YtTKU-py3.12/lib/python3.12/site-packages/fastapi/routing.py", line 296, in app
    content = await serialize_response(
              ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/happy/.cache/pypoetry/virtualenvs/twitter-k29YtTKU-py3.12/lib/python3.12/site-packages/fastapi/routing.py", line 155, in serialize_response
    raise ResponseValidationError(
fastapi.exceptions.ResponseValidationError: 1 validation errors:
  {'type': 'missing', 'loc': ('response', 'user'), 'msg': 'Field required', 'input': <app.models.users.User object at 0x7efcba7a1880>}