fix: debug telegram

This commit is contained in:
2026-05-16 16:06:01 +07:00
parent a74ffc0671
commit 3d660cc416
+3
View File
@@ -54,8 +54,11 @@ async def send_telegram(message: str) -> None:
async with httpx.AsyncClient(timeout=10) as client: async with httpx.AsyncClient(timeout=10) as client:
try: try:
resp = await client.post(url, data=payload) resp = await client.post(url, data=payload)
log.info("Telegram response %s: %s", resp.status_code, resp.text)
resp.raise_for_status() resp.raise_for_status()
log.info("Telegram: сообщение отправлено") log.info("Telegram: сообщение отправлено")
except httpx.HTTPStatusError as exc:
log.error("Telegram: ошибка %s%s", exc.response.status_code, exc.response.text)
except Exception as exc: except Exception as exc:
log.error("Telegram: ошибка отправки — %s", exc) log.error("Telegram: ошибка отправки — %s", exc)