HOTFIX: useMutation.run returns MutationOutcome (no throw); sweep all 7 call sites + README convention

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-06 00:44:56 +02:00
parent 3476b71525
commit 27299e225c
8 changed files with 54 additions and 40 deletions

View File

@@ -44,8 +44,9 @@ export default function BeckenFormPage() {
return
}
setErrors({})
const saved = await mutation.run({ name: form.name.trim(), notes: nn(form.notes) })
navigate(`/becken/${saved.id}`)
const result = await mutation.run({ name: form.name.trim(), notes: nn(form.notes) })
if (result.ok) navigate(`/becken/${result.value.id}`)
// On failure mutation.error drives the inline alert; run() never throws.
}
if (isEdit && existing.loading) return <p className="muted">{de.common.loading}</p>