fix(idaa): auto-retry 503 from Aether Novi proxy (mirrors network-error path)

Before: a 503 response from /v3/action/idaa/novi_member/{uuid} hit !response.ok
immediately, set verify_failed_for_uuid, and showed "Verification Unavailable" —
no automatic retry. In the old client-to-Novi flow an unreachable server threw
TypeError (auto-retried); the new server-side path returns a clean HTTP 503
(plain Error), bypassing the is_network_or_timeout branch.

After: 503 gets the same 3s wait + one retry that network/timeout errors get.
Only if the retry also 503s does it fall through to the error UI.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Scott Idem
2026-05-19 19:41:01 -04:00
parent 3ea362c166
commit 42f40e990e

View File

@@ -358,9 +358,21 @@ async function verify_novi_uuid(uuid: string, is_retry: boolean = false) {
return;
}
if (response.status === 503) {
// Novi unreachable or Novi 5xx — Aether backend returns 503.
// Mirror the network-error retry path: one automatic 3s wait before giving up.
if (is_retry) {
throw new Error(`Novi verification: Novi unreachable (503) — retry also failed`);
}
console.warn(`IDAA Layout: Novi unreachable (503) for ${uuid}. Retrying in 3s...`);
verifying_status_msg = 'Connection issue — retrying...';
await new Promise<void>((resolve) => setTimeout(resolve, 3_000));
await verify_novi_uuid(uuid, true);
return;
}
if (!response.ok) {
// 404 = not a member (Novi 404, or Novi empty-200 anti-pattern handled server-side).
// 503 = Novi unreachable / Novi 5xx — show api_error UI so user can retry.
throw new Error(`Novi verification returned ${response.status} for UUID ${uuid}`);
}