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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user