andyrocket8 / blacklist

Application for IP address blacklisting
0 stars 1 forks source link

Error on /history/{address_id} #11

Closed andyrocket8 closed 9 months ago

andyrocket8 commented 9 months ago

Got HTTP 500 Internal Server Error on GET /history/{address_id} handler execution.

Details:

INFO: 127.0.0.1:59836 - "GET /history/181.22.242.84 HTTP/1.1" 500 Internal Server Error ERROR: Exception in ASGI application Traceback (most recent call last): File "/home/core/.cache/pypoetry/virtualenvs/blacklist-3V88tF7O-py3.11/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi result = await app( # type: ignore[func-returns-value] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/core/.cache/pypoetry/virtualenvs/blacklist-3V88tF7O-py3.11/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in call return await self.app(scope, receive, send) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/core/.cache/pypoetry/virtualenvs/blacklist-3V88tF7O-py3.11/lib/python3.11/site-packages/fastapi/applications.py", line 1106, in call await super().call(scope, receive, send) File "/home/core/.cache/pypoetry/virtualenvs/blacklist-3V88tF7O-py3.11/lib/python3.11/site-packages/starlette/applications.py", line 122, in call await self.middleware_stack(scope, receive, send) File "/home/core/.cache/pypoetry/virtualenvs/blacklist-3V88tF7O-py3.11/lib/python3.11/site-packages/starlette/middleware/errors.py", line 184, in call raise exc File "/home/core/.cache/pypoetry/virtualenvs/blacklist-3V88tF7O-py3.11/lib/python3.11/site-packages/starlette/middleware/errors.py", line 162, in call await self.app(scope, receive, _send) File "/home/core/.cache/pypoetry/virtualenvs/blacklist-3V88tF7O-py3.11/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 79, in call raise exc File "/home/core/.cache/pypoetry/virtualenvs/blacklist-3V88tF7O-py3.11/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 68, in call await self.app(scope, receive, sender) File "/home/core/.cache/pypoetry/virtualenvs/blacklist-3V88tF7O-py3.11/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in call raise e File "/home/core/.cache/pypoetry/virtualenvs/blacklist-3V88tF7O-py3.11/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in call await self.app(scope, receive, send) File "/home/core/.cache/pypoetry/virtualenvs/blacklist-3V88tF7O-py3.11/lib/python3.11/site-packages/starlette/routing.py", line 718, in call await route.handle(scope, receive, send) File "/home/core/.cache/pypoetry/virtualenvs/blacklist-3V88tF7O-py3.11/lib/python3.11/site-packages/starlette/routing.py", line 276, in handle await self.app(scope, receive, send) File "/home/core/.cache/pypoetry/virtualenvs/blacklist-3V88tF7O-py3.11/lib/python3.11/site-packages/starlette/routing.py", line 66, in app response = await func(request) ^^^^^^^^^^^^^^^^^^^ File "/home/core/.cache/pypoetry/virtualenvs/blacklist-3V88tF7O-py3.11/lib/python3.11/site-packages/fastapi/routing.py", line 292, in app content = await serialize_response( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/core/.cache/pypoetry/virtualenvs/blacklist-3V88tF7O-py3.11/lib/python3.11/site-packages/fastapi/routing.py", line 155, in serialize_response raise ResponseValidationError( fastapi.exceptions.ResponseValidationError: 1 validation errors: {'type': 'model_attributes_type', 'loc': ('response',), 'msg': 'Input should be a valid dictionary or object to extract fields from', 'input': None, 'url': 'https://errors.pydantic.dev/2.5/v/model_attributes_type'}