diff --git a/mobile/src/api.ts b/mobile/src/api.ts index de700da..8265322 100644 --- a/mobile/src/api.ts +++ b/mobile/src/api.ts @@ -67,6 +67,12 @@ export class GoonClient { const text = await res.text().catch(() => res.statusText); throw new ApiError(res.status, `${res.status}: ${text}`); } + // 204 No Content (np. mark-dead endpoints) — puste body, `res.json()` rzuciłby + // "JSON Parse error". To powodowało fałszywy "Failed" alert przy "Mark as invalid" + // mimo że backend POPRAWNIE oznaczał link dead (bug-report 2026-05-28 Voe + 06-03). + if (res.status === 204) { + return undefined as T; + } const data = (await res.json()) as T; // Backend zwraca path-only `/proxy/...` dla CDN-ów wymagających Referera // (thumbnails, stream URLs). Klient prefixuje baseUrl-em rekursywnie tak żeby