fix and update
This commit is contained in:
@@ -449,7 +449,10 @@ export function isPinRequiredError(error: unknown): error is ApiError {
|
||||
}
|
||||
|
||||
export function isGatewayUnavailableError(error: unknown): boolean {
|
||||
return error instanceof ApiError && [502, 503, 504].includes(error.status);
|
||||
return (
|
||||
error instanceof ApiError &&
|
||||
(error.code === 'GATEWAY_UNAVAILABLE' || [502, 503, 504].includes(error.status))
|
||||
);
|
||||
}
|
||||
|
||||
export function getApiErrorMessage(error: unknown, fallback: string): string | null {
|
||||
@@ -681,7 +684,7 @@ export function buildSystemSettingPayload(setting: Pick<SystemSetting, 'key' | '
|
||||
const GATEWAY_RETRY_STATUS = new Set([502, 503, 504]);
|
||||
const GATEWAY_RETRY_ATTEMPTS = 4;
|
||||
const GATEWAY_STABLE_PROBE_INTERVAL_MS = 800;
|
||||
const GATEWAY_STABLE_MAX_ROUNDS = 18;
|
||||
const GATEWAY_STABLE_MAX_ROUNDS = 12;
|
||||
const API_MAX_CONCURRENT = 6;
|
||||
const API_BURST_MAX_CONCURRENT = 2;
|
||||
const API_BURST_WINDOW_MS = 5000;
|
||||
|
||||
Reference in New Issue
Block a user