Per-cell error precision
If your API returns per-field validation errors, throw a CommitError:
import { CommitError } from '@zvndev/yable-core'
const onCommit = async (patches) => {
const res = await fetch('/api/save', { ... })
if (!res.ok) {
const body = await res.json()
// body.errors looks like: { row1: { email: 'must be unique' } }
throw new CommitError(body.errors)
}
}
Cells listed in the error map go to error. Cells in the same batch but NOT in the error map are treated as successful.