From c70ddfe15742761299220ec0c84ada3c03330ba3 Mon Sep 17 00:00:00 2001 From: Egor Date: Mon, 2 Feb 2026 02:20:41 +0300 Subject: [PATCH] Update startup_notification_service.py --- app/services/startup_notification_service.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/app/services/startup_notification_service.py b/app/services/startup_notification_service.py index a644792d..a9ac5248 100644 --- a/app/services/startup_notification_service.py +++ b/app/services/startup_notification_service.py @@ -52,6 +52,12 @@ DATABASE_ERROR_KEYWORDS: Final[tuple[str, ...]] = ('database', 'postgres', 'conn REDIS_ERROR_KEYWORD: Final[str] = 'redis' REMNAWAVE_ERROR_KEYWORDS: Final[tuple[str, ...]] = ('remnawave', 'panel') AUTH_ERROR_KEYWORDS: Final[tuple[str, ...]] = ('unauthorized', 'bot token') +INLINE_BUTTON_URL_ERROR_KEYWORDS: Final[tuple[str, ...]] = ( + 'web app url', + 'url host is empty', + 'unsupported url protocol', + 'button url', +) class StartupNotificationService: @@ -340,6 +346,16 @@ def _get_error_recommendations(error_message: str) -> str | None: ] return '
πŸ’‘ Π Π΅ΠΊΠΎΠΌΠ΅Π½Π΄Π°Ρ†ΠΈΠΈ:\n' + '\n'.join(tips) + '
' + # Ошибки inline-ΠΊΠ½ΠΎΠΏΠΎΠΊ с URL (WebApp, кастомныС ΠΏΡ€ΠΎΡ‚ΠΎΠΊΠΎΠ»Ρ‹) + if any(keyword in error_lower for keyword in INLINE_BUTTON_URL_ERROR_KEYWORDS): + tips = [ + 'β€’ ΠŸΡ€ΠΎΠ²Π΅Ρ€ΡŒΡ‚Π΅ MINIAPP_CUSTOM_URL Π² .env', + 'β€’ ΠŸΡ€ΠΎΠ²Π΅Ρ€ΡŒΡ‚Π΅ HAPP_CRYPTOLINK_REDIRECT_TEMPLATE', + 'β€’ Telegram Π½Π΅ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΈΠ²Π°Π΅Ρ‚ кастомныС схСмы (happ://, v2ray://, ss://, ΠΈ Ρ‚.Π΄.) Π² inline-ΠΊΠ½ΠΎΠΏΠΊΠ°Ρ…', + 'β€’ Π˜ΡΠΏΠΎΠ»ΡŒΠ·ΡƒΠΉΡ‚Π΅ HTTPS Ρ€Π΅Π΄ΠΈΡ€Π΅ΠΊΡ‚ для Π΄ΠΈΠΏΠ»ΠΈΠ½ΠΊΠΎΠ²', + ] + return '
πŸ’‘ Π Π΅ΠΊΠΎΠΌΠ΅Π½Π΄Π°Ρ†ΠΈΠΈ:\n' + '\n'.join(tips) + '
' + return None