From e996c6da41e773e2c915c4f581a22bf242664b5d Mon Sep 17 00:00:00 2001 From: IK Date: Thu, 10 Sep 2026 19:12:15 +0700 Subject: [PATCH] A08: Pass errorPage on all pages with potential errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: Only index.astro passed errorPage={filterError}, missing: - index.astro unavailable (503) — Dataset оставался на error page - spots/[id].astro not found/unavailable — BreadcrumbList рендерился на 404 - records.astro unavailable (503) — no structuredData but should be explicit Fix: - index.astro: errorPage={filterError || unavailable} - spots/[id].astro: errorPage={!spot || unavailable} - records.astro: errorPage={unavailable} - report.astro: не нужен (structuredData не передаётся) Verification: - Astro build: 0 errors - Error pages (422, 503, 404) skip structuredData - Normal pages include structuredData - noindex still works for robots meta tag --- apps/web/src/pages/index.astro | 2 +- apps/web/src/pages/records.astro | 2 +- apps/web/src/pages/spots/[id].astro | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/web/src/pages/index.astro b/apps/web/src/pages/index.astro index a951296..26971f2 100644 --- a/apps/web/src/pages/index.astro +++ b/apps/web/src/pages/index.astro @@ -57,7 +57,7 @@ const datasetJsonLd = { creator: { "@type": "Organization", name: "RF4 Spotter" }, isAccessibleForFree: true, }; --- - +
RF4 Живая карта клёва

Выбирай место,
пока клюёт.

Свежие точки, рабочие приманки и честная оценка данных от игроков.

Туманное озеро на рассвете
Пульс водоёмов{items.length} {plural(items.length, ["точка показывает", "точки показывают", "точек показывают"])} активность
diff --git a/apps/web/src/pages/records.astro b/apps/web/src/pages/records.astro index b24cedf..0e9885d 100644 --- a/apps/web/src/pages/records.astro +++ b/apps/web/src/pages/records.astro @@ -9,7 +9,7 @@ let records: OfficialRecord[] = [], runs: ImportRun[] = [], fishes: DictionaryIt try { [records, runs, fishes, waterbodies] = await Promise.all([api(`/api/v1/records?${new URLSearchParams({ fish, waterbody })}`), api("/api/v1/imports?limit=1"), api("/api/v1/fishes"), api("/api/v1/waterbodies")]); } catch { unavailable = true; showNoIndex = true; Astro.response.status = 503; Astro.response.headers.set("Retry-After", "60"); } const last = runs[0]; --- - +
Публичные данные RF4

Официальные
рекорды

{last ? `Импорт: ${last.status}` : "Импорт ещё не запускался"}{last?.finished_at && {new Date(last.finished_at).toLocaleString("ru-RU")} · {last.rows_seen} строк}
{(fish || waterbody) && Сбросить}
Официальный источник

Последние записи

{records.length} показано
diff --git a/apps/web/src/pages/spots/[id].astro b/apps/web/src/pages/spots/[id].astro index 2847f20..ad3c12b 100644 --- a/apps/web/src/pages/spots/[id].astro +++ b/apps/web/src/pages/spots/[id].astro @@ -29,7 +29,7 @@ const breadcrumbs = spot ? { "@context": "https://schema.org", "@type": "Breadcr { "@type": "ListItem", position: 2, name: `${spot.waterbody} ${spot.x}:${spot.y}`, item: `https://rf4spotter.ru/spots/${spot.waterbody_slug}-${spot.x}x${spot.y}` }, ] } : null; --- - + ← Все активные точки {unavailable || !spot ?

Точка недоступна

API не ответил или такой точки нет.

: <>
{spot.waterbody}

Точка {spot.x}:{spot.y}

{spot.description}