gendesign/frontend
lekss361 e109400fcd fix(frontend): apiFetchWithStatus body stream double-read crash
Per user report: 'Failed to execute text on Response: body stream already read'
при analyze запросе с error response.

## Root cause

apiFetchWithStatus делал:
1. await response.json() (consumes body stream даже на parse error)
2. catch → await response.text() ← FAILS — stream already consumed

fetch API: response body — ReadableStream, consumable один раз.

## Fix

Read text() once → attempt JSON.parse. Если parse failed (HTML error page
от Caddy / 502 / etc) — оборачиваем в {detail: rawText}. Никаких
double-reads.

## Impact

Любой non-JSON error response (502/504/HTML/etc) теперь показывает реальный
detail вместо misleading 'body stream' error.

Refs: user report 2026-05-14
2026-05-15 07:34:37 +03:00
..
public feat(docs): /docs/b2b-channels (rendered) + /docs/b2b-channels.md (raw) for sharing 2026-05-11 23:36:02 +03:00
src fix(frontend): apiFetchWithStatus body stream double-read crash 2026-05-15 07:34:37 +03:00
.dockerignore fix(scraper): диагностируем «кнопка не работает» — Redis lock + task_received log 2026-04-28 23:17:42 +03:00
.env.example init 2026-04-25 13:45:19 +03:00
.eslintrc.json init 2026-04-25 13:45:19 +03:00
Dockerfile perf(ci): parallelize docker builds + add npm cache mount 2026-05-11 15:01:10 +03:00
next-env.d.ts add interactive analytics dashboard for Sverdlovsk market and PRINZIP 2026-04-27 16:55:30 +03:00
next.config.ts feat(docs): /docs/b2b-channels (rendered) + /docs/b2b-channels.md (raw) for sharing 2026-05-11 23:36:02 +03:00
package-lock.json add interactive analytics dashboard for Sverdlovsk market and PRINZIP 2026-04-27 16:55:30 +03:00
package.json add interactive analytics dashboard for Sverdlovsk market and PRINZIP 2026-04-27 16:55:30 +03:00
tsconfig.json init 2026-04-25 13:45:19 +03:00