fix(transcription): use domain-specific message in markAllReviewed catch
Removes the getErrorMessage() indirection and calls m.transcription_mark_all_reviewed_error() directly in the catch block. The previous implementation routed through getErrorMessage(code) which mapped any error code to the generic m.error_internal_error() fallback, leaving the domain-specific key unreachable. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { m } from '$lib/paraglide/messages.js';
|
||||
import { getErrorMessage } from '$lib/shared/errors.js';
|
||||
import TranscriptionBlock from './TranscriptionBlock.svelte';
|
||||
import OcrTrigger from '$lib/ocr/OcrTrigger.svelte';
|
||||
import TranscribeCoachEmptyState from '$lib/shared/help/TranscribeCoachEmptyState.svelte';
|
||||
@@ -72,8 +71,8 @@ async function handleMarkAllReviewed() {
|
||||
markAllError = null;
|
||||
try {
|
||||
await onMarkAllReviewed();
|
||||
} catch (e) {
|
||||
markAllError = getErrorMessage(e instanceof Error ? e.message : undefined);
|
||||
} catch {
|
||||
markAllError = m.transcription_mark_all_reviewed_error();
|
||||
} finally {
|
||||
markingAllReviewed = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user