mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-11-20 07:52:52 +08:00
feat(usage): list common gateway error codes in the request log status filter
The status filter only offered 200/400/401/429/500, so errors that gateways and upstreams return themselves (502/503/504, Cloudflare 520, Anthropic 529, 403/404) could not be filtered for. Extend the preset list with those codes instead of adding a free-form input inside the dropdown menu, which would fight Radix's menu keyboard handling for a long-tail need. Refs #9425
This commit is contained in:
@@ -95,7 +95,10 @@ const isRefreshIntervalOption = (
|
||||
const normalizeRefreshInterval = (value: number | undefined) =>
|
||||
isRefreshIntervalOption(value) ? value : DEFAULT_REFRESH_INTERVAL_MS;
|
||||
|
||||
const STATUS_CODE_OPTIONS = [200, 400, 401, 429, 500] as const;
|
||||
// 常见的网关 / 上游错误码也列上(520/529 是 Cloudflare、Anthropic 自己返回的)
|
||||
const STATUS_CODE_OPTIONS = [
|
||||
200, 400, 401, 403, 404, 429, 500, 502, 503, 504, 520, 529,
|
||||
] as const;
|
||||
|
||||
// 页签只放数据视图;显示和定价设置在「用量设置」抽屉里
|
||||
type UsageTab = "logs" | "providers" | "models";
|
||||
|
||||
Reference in New Issue
Block a user