From 42f40e990ee357c41a817a0a763bdedef0213b1d Mon Sep 17 00:00:00 2001 From: Scott Idem Date: Tue, 19 May 2026 19:41:01 -0400 Subject: [PATCH] fix(idaa): auto-retry 503 from Aether Novi proxy (mirrors network-error path) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/routes/idaa/(idaa)/+layout.svelte | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/routes/idaa/(idaa)/+layout.svelte b/src/routes/idaa/(idaa)/+layout.svelte index f3b56b88..c89cbd93 100644 --- a/src/routes/idaa/(idaa)/+layout.svelte +++ b/src/routes/idaa/(idaa)/+layout.svelte @@ -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((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}`); }