Class UniqueConstraintError

Thrown when a unique constraint is violated in the database

Hierarchy

Constructors

Properties

cause?: UniqueConstraintErrorParent

The database specific error which triggered this one

Array of ValidationErrorItem objects describing the validation errors

fields: Record<string, unknown>
message: string
name: string
sql: string
stack?: string
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Type declaration

stackTraceLimit: number

Accessors

  • get original(): this["cause"]
  • Returns this["cause"]

  • get parent(): this["cause"]
  • Returns this["cause"]

Methods

  • Gets all validation error items for the path / field specified.

    Returns

    Validation error items for the specified path

    Parameters

    • path: string

      The path to be checked for error items

    Returns ValidationErrorItem[]

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

Generated using TypeDoc