Shape of the thrown error captured into the hook's error state on a
non-2xx response. The hook types error as ActionExecuteError | null,
so consumers read its fields directly — no cast needed:
const message = error?.data?.message;
error.data.message is the actionable diagnostic for end users.
error.data.errors is a per-field map ({ <slug>: <message> }) when the
backend reports parameter-level validation failures; it is {} for
whole-request failures (e.g. a foreign-key constraint:
{ message: "Other rows refer to this row…", errors: {} }).
status is absent for transport-layer failures (offline, aborted) where
no HTTP response was received.
Shape of the thrown error captured into the hook's
errorstate on a non-2xx response. The hook typeserrorasActionExecuteError | null, so consumers read its fields directly — no cast needed:error.data.messageis the actionable diagnostic for end users.error.data.errorsis a per-field map ({ <slug>: <message> }) when the backend reports parameter-level validation failures; it is{}for whole-request failures (e.g. a foreign-key constraint:{ message: "Other rows refer to this row…", errors: {} }).statusis absent for transport-layer failures (offline, aborted) where no HTTP response was received.