diff --git a/frontend/src/lib/document/transcription/useTranscriptionBlocks.svelte.ts b/frontend/src/lib/document/transcription/useTranscriptionBlocks.svelte.ts index 3a601f1a..da864ad8 100644 --- a/frontend/src/lib/document/transcription/useTranscriptionBlocks.svelte.ts +++ b/frontend/src/lib/document/transcription/useTranscriptionBlocks.svelte.ts @@ -119,7 +119,11 @@ export function createTranscriptionBlocks( const res = await fetchImpl(`/api/documents/${documentId()}/transcription-blocks/review-all`, { method: 'PUT' }); - if (!res.ok) return; + if (!res.ok) { + const body = await res.json().catch(() => ({})); + // Never render body.message — route through getErrorMessage() to prevent leaking backend internals + throw new Error((body as { code?: string })?.code ?? 'INTERNAL_ERROR'); + } const updated = (await res.json()) as { id: string; reviewed: boolean }[]; for (const b of updated) { const existing = blocks.find((x) => x.id === b.id);