Changes made as recommended by Claude:

1. Added a request timeout to prevent server resources from being tied up (route.ts)
2. Implemented runtime validation for the API response shape (url-utils.ts)
3. Removed hardcoded English error messages and replaced them with localized strings (url-input-dialog.tsx)
4. Fixed the incorrect i18n namespace (changed from pdf.* to url.*) (url-input-dialog.tsx and en/ja/zh.json)
This commit is contained in:
Biki Kalita
2026-01-05 14:51:24 +05:30
parent 64268b0fac
commit 580d42f535
8 changed files with 1625 additions and 55 deletions

View File

@@ -187,7 +187,7 @@
"chars": "chars",
"removeFile": "Remove file"
},
"pdf": {
"url": {
"title": "Extract Content from URL",
"description": "Paste a URL to extract and analyze its content",
"Extracting": "Extracting...",

View File

@@ -187,7 +187,7 @@
"chars": "文字",
"removeFile": "ファイルを削除"
},
"pdf": {
"url": {
"title": "URLからコンテンツを抽出",
"description": "URLを貼り付けてそのコンテンツを抽出および分析します",
"Extracting": "抽出中...",

View File

@@ -187,7 +187,7 @@
"chars": "字符",
"removeFile": "移除文件"
},
"pdf": {
"url": {
"title": "从 URL 提取内容",
"description": "粘贴 URL 以提取和分析其内容",
"Extracting": "提取中...",