The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
TypeScript analyticsbibusiness-intelligencebusinessintelligenceclojuredashboarddatadata-analysisdata-visualizationdatabasemetabasemysqlpostgrespostgresqlreportingslacksql-editorvisualization
type ActionExecuteError = {
data: {
errors?: Record<string, string>;
message?: string;
};
isCancelled: boolean;
status?: number;
};
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.
Properties
| Property | Type |
|---|---|
data |
{ errors?: Record<string, string>; message?: string; } |
data.errors? |
Record<string, string> |
data.message? |
string |
isCancelled |
boolean |
status? |
number |