Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ParameterValidationError

Provides an error interface for handling when a function call has invalid parameters.

Hierarchy

  • ParameterValidationError

Implements

  • Error

Index

Constructors

constructor

  • new ParameterValidationError(paramIndex: number | string, expectedSchema: JSONSchema, receievedParam: any, errors: ErrorObject[]): ParameterValidationError
  • Parameters

    • paramIndex: number | string

      The index of the param that for this error (index of the param in MethodObject.params).

    • expectedSchema: JSONSchema

      The expected JSON Schema for the passed in value.

    • receievedParam: any

      The value of the param passed to the method call.

    • errors: ErrorObject[]

      The errors recieved by ajv

    Returns ParameterValidationError

Properties

expectedSchema

expectedSchema: JSONSchema

The expected JSON Schema for the passed in value.

message

message: string

name

name: string = "ParameterValidationError"

paramIndex

paramIndex: number | string

The index of the param that for this error (index of the param in MethodObject.params).

receievedParam

receievedParam: any

The value of the param passed to the method call.