This commit is contained in:
parent
6b6cedf0f5
commit
ac829b8086
|
@ -19,7 +19,11 @@ async def get_author(author_id):
|
||||||
"variables": {"author_id": int(author_id)},
|
"variables": {"author_id": int(author_id)},
|
||||||
}
|
}
|
||||||
async with AsyncClient() as client:
|
async with AsyncClient() as client:
|
||||||
|
try:
|
||||||
response = await client.post(API_BASE, headers=headers, json=gql)
|
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}")
|
print(f"[services.core] get_author: {response.status_code} {response.text}")
|
||||||
if response.status_code != 200:
|
if response.status_code != 200:
|
||||||
return None
|
return None
|
||||||
|
|
Loading…
Reference in New Issue
Block a user