Represents a validation error encountered during input validation or processing.

This class is used to handle errors related to invalid or missing parameters. It extends ESPBaseError to provide a structured error-handling mechanism.

Hierarchy (View Summary)

Constructors

  • Creates an instance of ESPValidationError.

    Parameters

    • code:
          | "MISSING_LOGIN_PASSWORD"
          | "MISSING_LOGIN_REQUEST_SESSION_TOKEN"
          | "MISSING_LOGIN_REQUEST_VERIFICATION_CODE"

      The error code corresponding to a specific validation error message from validationErrorMessages.

    Returns ESPValidationError

Properties

cause?: unknown
code: string

The specific error code associated with the error.

label: string

A label to classify the error type.

message: string
name: string
stack?: string
prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

Optional override for formatting stack traces

stackTraceLimit: number

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void