auth-debug
All checks were successful
deploy / deploy (push) Successful in 1m10s

This commit is contained in:
Untone 2023-12-22 12:25:44 +03:00
parent e22d5468ab
commit 0139819f27

View File

@ -35,6 +35,7 @@ async def check_auth(req) -> str | None:
# Asynchronous HTTP request to the authentication server
async with ClientSession() as session:
async with session.post(AUTH_URL, json=gql, headers=headers) as response:
print(f"[services.auth] HTTP Response {response.status} {response.text()}")
if response.status == 200:
data = await response.json()
errors = data.get("errors")
@ -46,6 +47,7 @@ async def check_auth(req) -> str | None:
print(f"[services.auth] got user_id: {user_id}")
return user_id
except Exception as e:
# Handling and logging exceptions during authentication check
print(f"[services.auth] {e}")