Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions messages/en/dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,18 @@
},
"errorMessage": "Error Message",
"fake200ForwardedNotice": "Note: For streaming requests, this failure may be detected only after the stream ends; the response content may already have been forwarded to the client.",
"fake200DetectedReason": "Detected reason: {reason}",
"fake200Reasons": {
"emptyBody": "Empty response body",
"htmlBody": "HTML document returned (likely an error page)",
"jsonErrorNonEmpty": "JSON has a non-empty `error` field",
"jsonErrorMessageNonEmpty": "JSON has a non-empty `error.message`",
"jsonMessageKeywordMatch": "JSON `message` contains the word \"error\" (heuristic)",
"unknown": "Response body indicates an error"
},
"statusCodeInferredBadge": "Inferred",
"statusCodeInferredTooltip": "This status code is inferred from response body content (e.g., fake 200) and may differ from the upstream HTTP status.",
"statusCodeInferredSuffix": "(inferred)",
"filteredProviders": "Filtered Providers",
"providerChain": {
"title": "Provider Decision Chain Timeline",
Expand Down Expand Up @@ -315,6 +327,7 @@
"prioritySelection": "Priority Selection",
"attemptProvider": "Attempt: {provider}",
"retryAttempt": "Retry #{number}",
"httpStatus": "HTTP {code}{inferredSuffix}",
"sessionReuse": "Session Reuse",
"sessionReuseDesc": "Reusing provider from session cache",
"sessionReuseTitle": "Session Binding",
Expand Down
5 changes: 5 additions & 0 deletions messages/en/provider-chain.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"candidate": "{name}({probability}%)",
"requestChain": "Request Chain:",
"systemError": "System Error",
"resourceNotFound": "Resource Not Found (404)",
"concurrentLimit": "Concurrent Limit",
"http2Fallback": "HTTP/2 Fallback",
"clientError": "Client Error",
Expand All @@ -46,6 +47,7 @@
"retry_success": "Retry Success",
"retry_failed": "Retry Failed",
"system_error": "System Error",
"resource_not_found": "Resource Not Found (404)",
"client_error_non_retryable": "Client Error",
"concurrent_limit_failed": "Concurrent Limit",
"http2_fallback": "HTTP/2 Fallback",
Expand Down Expand Up @@ -128,11 +130,13 @@
"candidateInfo": " • {name}: weight={weight} cost={cost} probability={probability}%",
"selected": "✓ Selected: {provider}",
"requestFailed": "Request Failed (Attempt {attempt})",
"resourceNotFoundFailed": "Resource Not Found (404) (Attempt {attempt})",
"attemptNumber": "Attempt {number}",
"firstAttempt": "First Attempt",
"nthAttempt": "Attempt {attempt}",
"provider": "Provider: {provider}",
"statusCode": "Status Code: {code}",
"statusCodeInferred": "Status Code (inferred): {code}",
"error": "Error: {error}",
"requestDuration": "Request Duration: {duration}ms",
"requestDurationSeconds": "Request Duration: {duration}s",
Expand All @@ -158,6 +162,7 @@
"meaning": "Meaning",
"notCountedInCircuit": "This error is not counted in provider circuit breaker",
"systemErrorNote": "Note: This error is not counted in provider circuit breaker",
"resourceNotFoundNote": "Note: This error is not counted in the circuit breaker and will trigger failover after retries are exhausted.",
"reselection": "Reselecting Provider",
"reselect": "Reselecting Provider",
"excluded": "Excluded: {providers}",
Expand Down
13 changes: 13 additions & 0 deletions messages/ja/dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,18 @@
},
"errorMessage": "エラーメッセージ",
"fake200ForwardedNotice": "注意:ストリーミング要求では、失敗判定がストリーム終了後になる場合があります。応答内容は既にクライアントへ転送されている可能性があります。",
"fake200DetectedReason": "検出理由:{reason}",
"fake200Reasons": {
"emptyBody": "レスポンス本文が空です",
"htmlBody": "HTML ドキュメントが返されました (エラーページの可能性)",
"jsonErrorNonEmpty": "JSON の `error` フィールドが空ではありません",
"jsonErrorMessageNonEmpty": "JSON の `error.message` が空ではありません",
"jsonMessageKeywordMatch": "JSON の `message` に \"error\" が含まれています (ヒューリスティック)",
"unknown": "レスポンス本文がエラーを示しています"
},
"statusCodeInferredBadge": "推定",
"statusCodeInferredTooltip": "このステータスコードは応答本文の内容(例: fake 200)から推定されており、上流の HTTP ステータスと異なる場合があります。",
"statusCodeInferredSuffix": "(推定)",
"filteredProviders": "フィルタされたプロバイダー",
"providerChain": {
"title": "プロバイダー決定チェーンタイムライン",
Expand Down Expand Up @@ -315,6 +327,7 @@
"prioritySelection": "優先度選択",
"attemptProvider": "試行: {provider}",
"retryAttempt": "再試行 #{number}",
"httpStatus": "HTTP {code}{inferredSuffix}",
"sessionReuse": "セッション再利用",
"sessionReuseDesc": "セッションキャッシュからプロバイダーを再利用",
"sessionReuseTitle": "セッションバインディング",
Expand Down
5 changes: 5 additions & 0 deletions messages/ja/provider-chain.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"candidate": "{name}({probability}%)",
"requestChain": "リクエストチェーン:",
"systemError": "システムエラー",
"resourceNotFound": "リソースが見つかりません(404)",
"concurrentLimit": "同時実行制限",
"http2Fallback": "HTTP/2 フォールバック",
"clientError": "クライアントエラー",
Expand All @@ -46,6 +47,7 @@
"retry_success": "リトライ成功",
"retry_failed": "リトライ失敗",
"system_error": "システムエラー",
"resource_not_found": "リソースが見つかりません(404)",
"client_error_non_retryable": "クライアントエラー",
"concurrent_limit_failed": "同時実行制限",
"http2_fallback": "HTTP/2 フォールバック",
Expand Down Expand Up @@ -128,11 +130,13 @@
"candidateInfo": " • {name}: 重み={weight} コスト={cost} 確率={probability}%",
"selected": "✓ 選択: {provider}",
"requestFailed": "リクエスト失敗(試行{attempt})",
"resourceNotFoundFailed": "リソースが見つかりません(404)(試行{attempt})",
"attemptNumber": "試行 {number}",
"firstAttempt": "初回試行",
"nthAttempt": "試行{attempt}",
"provider": "プロバイダー: {provider}",
"statusCode": "ステータスコード: {code}",
"statusCodeInferred": "ステータスコード(推定): {code}",
"error": "エラー: {error}",
"requestDuration": "リクエスト時間: {duration}ms",
"requestDurationSeconds": "リクエスト時間: {duration}s",
Expand All @@ -158,6 +162,7 @@
"meaning": "意味",
"notCountedInCircuit": "このエラーはプロバイダーサーキットブレーカーにカウントされません",
"systemErrorNote": "注記:このエラーはプロバイダーサーキットブレーカーにカウントされません",
"resourceNotFoundNote": "注記:このエラーはサーキットブレーカーにカウントされず、リトライ枯渇後にフェイルオーバーします。",
"reselection": "プロバイダー再選択",
"reselect": "プロバイダー再選択",
"excluded": "除外済み: {providers}",
Expand Down
13 changes: 13 additions & 0 deletions messages/ru/dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,18 @@
},
"errorMessage": "Сообщение об ошибке",
"fake200ForwardedNotice": "Примечание: для потоковых запросов эта ошибка может быть обнаружена только после завершения потока; содержимое ответа могло уже быть передано клиенту.",
"fake200DetectedReason": "Причина обнаружения: {reason}",
"fake200Reasons": {
"emptyBody": "Пустое тело ответа",
"htmlBody": "Получен HTML-документ (возможно, страница ошибки)",
"jsonErrorNonEmpty": "В JSON непустое поле `error`",
"jsonErrorMessageNonEmpty": "В JSON непустое `error.message`",
"jsonMessageKeywordMatch": "В JSON `message` содержит слово \"error\" (эвристика)",
"unknown": "Тело ответа указывает на ошибку"
},
"statusCodeInferredBadge": "Предположено",
"statusCodeInferredTooltip": "Этот код состояния выведен по содержимому тела ответа (например, fake 200) и может отличаться от HTTP-кода апстрима.",
"statusCodeInferredSuffix": "(предп.)",
"filteredProviders": "Отфильтрованные поставщики",
"providerChain": {
"title": "Хронология цепочки решений поставщика",
Expand Down Expand Up @@ -315,6 +327,7 @@
"prioritySelection": "Выбор по приоритету",
"attemptProvider": "Попытка: {provider}",
"retryAttempt": "Повтор #{number}",
"httpStatus": "HTTP {code}{inferredSuffix}",
"sessionReuse": "Повторное использование сессии",
"sessionReuseDesc": "Провайдер из кэша сессии",
"sessionReuseTitle": "Привязка сессии",
Expand Down
5 changes: 5 additions & 0 deletions messages/ru/provider-chain.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"candidate": "{name}({probability}%)",
"requestChain": "Цепочка запросов:",
"systemError": "Системная ошибка",
"resourceNotFound": "Ресурс не найден (404)",
"concurrentLimit": "Лимит параллельных запросов",
"http2Fallback": "Откат HTTP/2",
"clientError": "Ошибка клиента",
Expand All @@ -46,6 +47,7 @@
"retry_success": "Повтор успешен",
"retry_failed": "Повтор не удался",
"system_error": "Системная ошибка",
"resource_not_found": "Ресурс не найден (404)",
"client_error_non_retryable": "Ошибка клиента",
"concurrent_limit_failed": "Лимит параллельных запросов",
"http2_fallback": "Откат HTTP/2",
Expand Down Expand Up @@ -128,11 +130,13 @@
"candidateInfo": " • {name}: вес={weight} стоимость={cost} вероятность={probability}%",
"selected": "✓ Выбрано: {provider}",
"requestFailed": "Запрос не выполнен (Попытка {attempt})",
"resourceNotFoundFailed": "Ресурс не найден (404) (Попытка {attempt})",
"attemptNumber": "Попытка {number}",
"firstAttempt": "Первая попытка",
"nthAttempt": "Попытка {attempt}",
"provider": "Провайдер: {provider}",
"statusCode": "Код состояния: {code}",
"statusCodeInferred": "Код состояния (выведено): {code}",
"error": "Ошибка: {error}",
"requestDuration": "Длительность запроса: {duration}мс",
"requestDurationSeconds": "Длительность запроса: {duration}с",
Expand All @@ -158,6 +162,7 @@
"meaning": "Значение",
"notCountedInCircuit": "Эта ошибка не учитывается в автомате защиты провайдера",
"systemErrorNote": "Примечание: Эта ошибка не учитывается в автомате защиты провайдера",
"resourceNotFoundNote": "Примечание: Эта ошибка не учитывается в автомате защиты; после исчерпания повторов произойдёт переключение.",
"reselection": "Повторный выбор провайдера",
"reselect": "Повторный выбор провайдера",
"excluded": "Исключено: {providers}",
Expand Down
13 changes: 13 additions & 0 deletions messages/zh-CN/dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,18 @@
},
"errorMessage": "错误信息",
"fake200ForwardedNotice": "提示:对于流式请求,该失败可能在流结束后才被识别;响应内容可能已原样透传给客户端。",
"fake200DetectedReason": "检测原因:{reason}",
"fake200Reasons": {
"emptyBody": "响应体为空",
"htmlBody": "返回了 HTML 文档(可能是错误页)",
"jsonErrorNonEmpty": "JSON 顶层 error 字段非空",
"jsonErrorMessageNonEmpty": "JSON 中 error.message 非空",
"jsonMessageKeywordMatch": "JSON message 字段包含 \"error\"(启发式)",
"unknown": "响应体内容指示错误"
},
"statusCodeInferredBadge": "推测",
"statusCodeInferredTooltip": "该状态码根据响应体内容推断(例如假200),可能与上游真实 HTTP 状态码不同。",
"statusCodeInferredSuffix": "(推测)",
"filteredProviders": "被过滤的供应商",
"providerChain": {
"title": "供应商决策链时间线",
Expand Down Expand Up @@ -315,6 +327,7 @@
"prioritySelection": "优先级选择",
"attemptProvider": "尝试: {provider}",
"retryAttempt": "重试 #{number}",
"httpStatus": "HTTP {code}{inferredSuffix}",
"sessionReuse": "会话复用",
"sessionReuseDesc": "从会话缓存复用供应商",
"sessionReuseTitle": "会话绑定",
Expand Down
5 changes: 5 additions & 0 deletions messages/zh-CN/provider-chain.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"candidate": "{name}({probability}%)",
"requestChain": "请求链路:",
"systemError": "系统错误",
"resourceNotFound": "资源不存在(404)",
"concurrentLimit": "并发限制",
"http2Fallback": "HTTP/2 回退",
"clientError": "客户端错误",
Expand All @@ -46,6 +47,7 @@
"retry_success": "重试成功",
"retry_failed": "重试失败",
"system_error": "系统错误",
"resource_not_found": "资源不存在(404)",
"client_error_non_retryable": "客户端错误",
"concurrent_limit_failed": "并发限制",
"http2_fallback": "HTTP/2 回退",
Expand Down Expand Up @@ -128,11 +130,13 @@
"candidateInfo": " • {name}: 权重={weight} 成本={cost} 概率={probability}%",
"selected": "✓ 选择: {provider}",
"requestFailed": "请求失败(第 {attempt} 次尝试)",
"resourceNotFoundFailed": "资源不存在(404,第 {attempt} 次尝试)",
"attemptNumber": "第 {number} 次",
"firstAttempt": "首次尝试",
"nthAttempt": "第 {attempt} 次尝试",
"provider": "供应商: {provider}",
"statusCode": "状态码: {code}",
"statusCodeInferred": "状态码(推测): {code}",
"error": "错误: {error}",
"requestDuration": "请求耗时: {duration}ms",
"requestDurationSeconds": "请求耗时: {duration}s",
Expand All @@ -158,6 +162,7 @@
"meaning": "含义",
"notCountedInCircuit": "此错误不计入供应商熔断器",
"systemErrorNote": "说明:此错误不计入供应商熔断器",
"resourceNotFoundNote": "说明:该错误不计入熔断器;重试耗尽后将触发故障转移。",
"reselection": "重新选择供应商",
"reselect": "重新选择供应商",
"excluded": "已排除: {providers}",
Expand Down
13 changes: 13 additions & 0 deletions messages/zh-TW/dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,18 @@
},
"errorMessage": "錯誤訊息",
"fake200ForwardedNotice": "提示:對於串流請求,此失敗可能在串流結束後才被識別;回應內容可能已原樣透傳給用戶端。",
"fake200DetectedReason": "檢測原因:{reason}",
"fake200Reasons": {
"emptyBody": "回應本文為空",
"htmlBody": "回傳了 HTML 文件(可能是錯誤頁)",
"jsonErrorNonEmpty": "JSON 頂層 error 欄位非空",
"jsonErrorMessageNonEmpty": "JSON 中 error.message 非空",
"jsonMessageKeywordMatch": "JSON message 欄位包含 \"error\"(啟發式)",
"unknown": "回應本文內容顯示錯誤"
},
"statusCodeInferredBadge": "推測",
"statusCodeInferredTooltip": "此狀態碼係根據回應內容推測(例如假200),可能與上游真實 HTTP 狀態碼不同。",
"statusCodeInferredSuffix": "(推測)",
"filteredProviders": "被過濾的供應商",
"providerChain": {
"title": "供應商決策鏈時間軸",
Expand Down Expand Up @@ -315,6 +327,7 @@
"prioritySelection": "優先順序選擇",
"attemptProvider": "嘗試: {provider}",
"retryAttempt": "重試 #{number}",
"httpStatus": "HTTP {code}{inferredSuffix}",
"sessionReuse": "會話複用",
"sessionReuseDesc": "從會話快取複用供應商",
"sessionReuseTitle": "會話綁定",
Expand Down
5 changes: 5 additions & 0 deletions messages/zh-TW/provider-chain.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"candidate": "{name}({probability}%)",
"requestChain": "請求鏈路:",
"systemError": "系統錯誤",
"resourceNotFound": "資源不存在(404)",
"concurrentLimit": "並發限制",
"http2Fallback": "HTTP/2 回退",
"clientError": "客戶端錯誤",
Expand All @@ -46,6 +47,7 @@
"retry_success": "重試成功",
"retry_failed": "重試失敗",
"system_error": "系統錯誤",
"resource_not_found": "資源不存在(404)",
"client_error_non_retryable": "客戶端錯誤",
"concurrent_limit_failed": "並發限制",
"http2_fallback": "HTTP/2 回退",
Expand Down Expand Up @@ -128,11 +130,13 @@
"candidateInfo": " • {name}: 權重={weight} 成本={cost} 概率={probability}%",
"selected": "✓ 選擇: {provider}",
"requestFailed": "請求失敗(第 {attempt} 次嘗試)",
"resourceNotFoundFailed": "資源不存在(404,第 {attempt} 次嘗試)",
"attemptNumber": "第 {number} 次",
"firstAttempt": "首次嘗試",
"nthAttempt": "第 {attempt} 次嘗試",
"provider": "供應商: {provider}",
"statusCode": "狀態碼: {code}",
"statusCodeInferred": "狀態碼(推測): {code}",
"error": "錯誤: {error}",
"requestDuration": "請求耗時: {duration}ms",
"requestDurationSeconds": "請求耗時: {duration}s",
Expand All @@ -158,6 +162,7 @@
"meaning": "含義",
"notCountedInCircuit": "此錯誤不計入供應商熔斷器",
"systemErrorNote": "說明:此錯誤不計入供應商熔斷器",
"resourceNotFoundNote": "說明:該錯誤不計入熔斷器;重試耗盡後將觸發故障轉移。",
"reselection": "重新選擇供應商",
"reselect": "重新選擇供應商",
"excluded": "已排除: {providers}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ const messages = {
prioritySelection: "Priority Selection",
attemptProvider: "Attempt: {provider}",
retryAttempt: "Retry #{number}",
httpStatus: "HTTP {code}{inferredSuffix}",
},
noError: {
processing: "No error (processing)",
Expand All @@ -253,6 +254,15 @@ const messages = {
},
errorMessage: "Error message",
fake200ForwardedNotice: "Note: detected after stream end; payload may have been forwarded",
fake200DetectedReason: "Detected reason: {reason}",
fake200Reasons: {
emptyBody: "Empty response body",
htmlBody: "HTML document returned",
jsonErrorNonEmpty: "JSON has non-empty error field",
jsonErrorMessageNonEmpty: "JSON has non-empty error.message",
jsonMessageKeywordMatch: 'JSON message contains "error"',
unknown: "Response body indicates an error",
Comment on lines +259 to +264
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

字符串引号需统一为双引号

Line 263 使用单引号,违反当前代码格式规范。建议改为双引号并转义内部引号。

修改建议
-          jsonMessageKeywordMatch: 'JSON message contains "error"',
+          jsonMessageKeywordMatch: "JSON message contains \"error\"",

As per coding guidelines: Format code with Biome using: double quotes, trailing commas, 2-space indent, 100 character line width.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
emptyBody: "Empty response body",
htmlBody: "HTML document returned",
jsonErrorNonEmpty: "JSON has non-empty error field",
jsonErrorMessageNonEmpty: "JSON has non-empty error.message",
jsonMessageKeywordMatch: 'JSON message contains "error"',
unknown: "Response body indicates an error",
emptyBody: "Empty response body",
htmlBody: "HTML document returned",
jsonErrorNonEmpty: "JSON has non-empty error field",
jsonErrorMessageNonEmpty: "JSON has non-empty error.message",
jsonMessageKeywordMatch: "JSON message contains \"error\"",
unknown: "Response body indicates an error",
🤖 Prompt for AI Agents
In `@src/app/`[locale]/dashboard/logs/_components/error-details-dialog.test.tsx
around lines 259 - 264, The string value for the jsonMessageKeywordMatch entry
uses single quotes and should use double quotes according to the project's Biome
formatting rules; update the value for jsonMessageKeywordMatch in the same
object (the mapping with keys emptyBody, htmlBody, jsonErrorNonEmpty,
jsonErrorMessageNonEmpty, jsonMessageKeywordMatch, unknown) to use double quotes
and escape the internal quotes (e.g., JSON message contains \"error\"),
preserving the trailing comma and existing indentation.

},
viewDetails: "View details",
filteredProviders: "Filtered providers",
providerChain: {
Expand Down Expand Up @@ -339,6 +349,7 @@ describe("error-details-dialog layout", () => {

expect(html).toContain("FAKE_200_EMPTY_BODY");
expect(html).toContain("Note: detected after stream end; payload may have been forwarded");
expect(html).toContain("Detected reason: Empty response body");
});

test("renders special settings section when specialSettings exists", () => {
Expand Down
Loading
Loading