fix: standardize unavailable page responses

This commit is contained in:
ik
2026-09-21 18:34:23 +07:00
parent 11e54a7842
commit a701397e41
11 changed files with 42 additions and 16 deletions
+7 -1
View File
@@ -25,7 +25,13 @@ try {
items = (await api<PaginatedOfficialRecord>(`/api/v1/records?${query}`)).items;
}
[runs, fishes, waterbodies] = await Promise.all([api<ImportRun[]>("/api/v1/imports?limit=1"), api<DictionaryItem[]>("/api/v1/fishes"), api<DictionaryItem[]>("/api/v1/waterbodies")]);
} catch { unavailable = true; showNoIndex = true; Astro.response.status = 503; Astro.response.headers.set("Retry-After", "60"); }
} catch {
unavailable = true;
showNoIndex = true;
Astro.response.status = 503;
Astro.response.headers.set("Retry-After", "60");
Astro.response.headers.set("Cache-Control", "no-store");
}
const last = runs[0];
---
<Layout title="Официальные рекорды Russian Fishing 4 — RF4 Spotter" description="Последние официальные рекорды RF4 по рыбам и водоёмам: вес, приманка, игрок, дата и прямая ссылка на источник." noindex={showNoIndex} errorPage={unavailable}>