Interfaces

@system-inc/base-foundation · 515c140 · 2 symbols

A JSON-serializable representation of an argument validation error.

extends BaseErrorData

Members

  • cause?: { cause?: { readonly name: string; readonly message: string; readonly statusCode: number; readonly stack?: string | undefined; readonly errorCode?: string | undefined; readonly cause?: ... | undefined; readonly extensions?: Readonly<...> | undefined; } | undefined; errorCode?: string; extensions?: Readonly<JsonObject>; message: string; name: string; stack?: string; statusCode: number }

    The underlying cause of the error.

  • errorCode: "VALIDATION_ERROR"

    Application-specific error code for programmatic error handling.

  • extensions: Readonly<Dictionary<string>> & { validationErrors: readonly (Readonly<{ constraints: { [rule: string]: string }; path: string }>)[] }

    Any additional information related to the error.

  • message: string

    The error message.

  • name: "ArgumentValidationError"

    The name of the error type.

  • stack?: string

    The stack trace of the error.

  • statusCode: number

    The HTTP status code associated with the error.

View source ↗

Options for creating HTTP errors.

Members

  • errorCode?: string

    Application-specific error code.

  • message?: string

    Custom error message. If not provided, a default message based on the status code will be used.

View source ↗