From 746d9bc7e40a156a75ba04fe0f131477aa7ef412 Mon Sep 17 00:00:00 2001 From: dddennnisss Date: Fri, 14 Aug 2026 12:14:59 +0700 Subject: [PATCH] =?UTF-8?q?handlers.py:=20=D0=B2=D1=81=D0=B5=20=D1=82?= =?UTF-8?q?=D0=B5=D1=85=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B8=20=D1=87=D0=B5?= =?UTF-8?q?=D1=80=D0=B5=D0=B7=20photo=5Ferror=5Fhandling()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- photo_bot/handlers.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/photo_bot/handlers.py b/photo_bot/handlers.py index 553575e..0f59264 100644 --- a/photo_bot/handlers.py +++ b/photo_bot/handlers.py @@ -175,13 +175,8 @@ async def photo_module_handler(msg: Message): msg_text = result.get("message", "Фото обработано") await msg.answer(f"✅ {msg_text}", parse_mode="html") else: - error = result.get("error", "Неизвестная ошибка") - if "уже есть фото" in error: - await msg.answer(photo_error_already_pending(), parse_mode="html") - elif "отклонено" in error.lower() or "не прошел" in error.lower(): - await msg.answer(photo_error_rejected(error), parse_mode="html") - else: - await msg.answer(f"❌ Ошибка: {error}", parse_mode="html") + # Любая ошибка API — системная заглушка + await msg.answer(photo_error_handling(), parse_mode="html") except Exception as e: await handle_photo_error(msg, user_id, "Отправка фото через API", str(e))