Options
All
  • Public
  • Public/Protected
  • All
Menu

Class UniqueConstraintError

Thrown when a unique constraint is violated in the database

Hierarchy

Implements

  • CommonErrorProperties

Index

Constructors

Properties

cause: undefined | 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.

    Parameters

    • path: string

      The path to be checked for error items

    Returns ValidationErrorItem[]

    Validation error items for the specified path

  • captureStackTrace(targetObject: object, constructorOpt?: Function): void
  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

Generated using TypeDoc