BrainlyAPIRequestGeneralException: [None] Brainly API exception: the response status is 502
Closed this issue · 0 comments
vlaex commented
View details in Rollbar: https://rollbar.com/znanijadev.bots1/znanija-tools-server/items/4/
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 64, 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 680, in __call__
await route.handle(scope, receive, send)
File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 275, in handle
await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 65, in app
response = await func(request)
File "/usr/local/lib/python3.10/site-packages/fastapi/routing.py", line 231, in app
raw_response = await run_endpoint_function(
File "/usr/local/lib/python3.10/site-packages/fastapi/routing.py", line 160, in run_endpoint_function
return await dependant.call(**values)
File "/code/./app/routes/brainly_ranking.py", line 25, in get_active_users_from_rankings
data = await graphql_api.query(
File "/code/./app/brainly_api/graphql.py", line 19, in query
r = await self._make_request(
File "/code/./app/brainly_api/api.py", line 48, in _make_request
raise BrainlyAPIRequestGeneralException(str(exc))
BrainlyAPIRequestGeneralException: [None] Brainly API exception: the response status is 502Traceback (most recent call last):
File "/code/./app/brainly_api/api.py", line 44, in _make_request
assert r.status_code != HTTPStatus.BAD_GATEWAY, f"the response status is {r.status_code}"
AssertionError: the response status is 502