Skip to content

Commit 1dc92bf

Browse files
committed
fix: improve Telegram API error handling
- Added detailed error logging for Telegram API - Show Telegram error description in response - Added .env.local to .gitignore - Better error messages for debugging
1 parent 4aee8f0 commit 1dc92bf

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,4 @@ __pycache__/
4949
env/
5050
venv/
5151
ENV/
52+
.env.local

app/api/submit-tool/route.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,11 @@ _Tam kodu görmek için web paneline bakın_
6969
}
7070
)
7171

72+
const telegramData = await telegramResponse.json()
73+
7274
if (!telegramResponse.ok) {
73-
throw new Error('Telegram API hatası')
75+
console.error('Telegram API error:', telegramData)
76+
throw new Error(`Telegram API hatası: ${telegramData.description || 'Bilinmeyen hata'}`)
7477
}
7578

7679
return NextResponse.json({

0 commit comments

Comments
 (0)