This commit is contained in:
parent
e22d5468ab
commit
0139819f27
|
@ -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}")
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user