Stone.js API
    Preparing search index...

    Thrown when a value fails validation.

    It carries the normalised ValidationIssues so any layer can render them (an HTTP error handler into 422 + problem+json, a CLI into a table, a form into field errors). The error itself stays platform-agnostic — it knows nothing about HTTP.

    Hierarchy

    • IntegrationError
      • ValidationError
    Index
    cause?: Error
    code?: string
    issues: ValidationIssue[]

    The normalised validation issues.

    metadata?: unknown
    • A plain, serialisable representation (suitable as a problem+json errors payload).

      Returns Record<string, string[]>

      The issues keyed by dotted path.

    • Converts the error to a formatted string representation.

      Parameters

      • Optionalmultiline: boolean

        Determine if output value must be multiline or not.

      Returns string

      A formatted error string.

    • Create a RuntimeError.

      Type Parameters

      • T extends RuntimeError = RuntimeError

      Parameters

      • message: string
      • Optionaloptions: ErrorOptions

        The options to create a RuntimeError.

      Returns T

      A new RuntimeError instance.