From 11abb5dbcb75b44b36a6cb15be4c5e66a005476c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yusuf=20=C4=B0pek?= Date: Fri, 10 Apr 2026 21:53:56 +0300 Subject: [PATCH] fix(notifications): improve error handling for Telegram test by logging detailed error message --- app/api/settings/notifications/route.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/api/settings/notifications/route.ts b/app/api/settings/notifications/route.ts index c735224..2aa5a84 100644 --- a/app/api/settings/notifications/route.ts +++ b/app/api/settings/notifications/route.ts @@ -154,8 +154,8 @@ export async function POST(request: NextRequest) { if (!res.ok) { const data = await res.json().catch(() => ({})); - const desc = (data as { description?: string }).description || 'Unknown error'; - return apiErrors.badRequest(`Telegram test failed: ${desc}`); + logError('Telegram test failed:', (data as { description?: string }).description); + return apiErrors.badRequest('Telegram test failed: check that the Chat ID is correct and the bot has been started'); } const response = successResponse({ message: 'Test message sent to Telegram' });