debug-get-author
All checks were successful
deploy / deploy (push) Successful in 1m11s

This commit is contained in:
Untone 2023-10-16 23:46:33 +03:00
parent 6b6cedf0f5
commit ac829b8086

View File

@ -19,7 +19,11 @@ async def get_author(author_id):
"variables": {"author_id": int(author_id)},
}
async with AsyncClient() as client:
try:
response = await client.post(API_BASE, headers=headers, json=gql)
except Exception:
import traceback
traceback.print_exc()
print(f"[services.core] get_author: {response.status_code} {response.text}")
if response.status_code != 200:
return None