mirror of
https://github.com/catspace-dev/unicheckbot.git
synced 2024-11-24 23:03:45 +03:00
parent
e61c7caab5
commit
4931730a8e
|
@ -62,9 +62,13 @@ async def send_api_request(client: AsyncClient, endpoint: str, data: dict, node:
|
|||
f"{node.address}/{endpoint}", params=data
|
||||
)
|
||||
except Exception as e:
|
||||
# Remove token from log data
|
||||
del data["token"]
|
||||
logger.error(f"Node {node.address} got Error. Data: {data}. Endpoint: {endpoint}. Full exception: {e}")
|
||||
result = Response(500)
|
||||
await send_message_to_admins(f"Node {node.address} got error {e}. Full exception: ```{format_exc()}```")
|
||||
await send_message_to_admins(f"Node {node.address} got error {e}. \n"
|
||||
f"Data: {data}, Endpoint: {endpoint}\n"
|
||||
f"Full exception: ```{format_exc()}```")
|
||||
await push_api_request_status(
|
||||
result.status_code,
|
||||
endpoint
|
||||
|
|
Loading…
Reference in New Issue
Block a user