StoreError

See source code
Table of contents

Information about an error that occurred in the store.

interface StoreError {}

Example

const error: StoreError = {
  error: new Error('Validation failed'),
  phase: 'updateRecord',
  recordBefore: oldRecord,
  recordAfter: newRecord,
  isExistingValidationIssue: false,
}

Properties

error

The error that occurred

error: Error

isExistingValidationIssue

Whether this is an existing validation issue

isExistingValidationIssue: boolean

phase

The phase during which the error occurred

phase: 'createRecord' | 'initialize' | 'tests' | 'updateRecord'

recordAfter

The record state after the operation

recordAfter: unknown

recordBefore

optional

The record state before the operation (if applicable)

recordBefore?: unknown

Prev
StandaloneDependsOn
Next
StoreListenerFilters