Class: ValidationError

Defined in: errors.ts:181

Error thrown when input validation fails.

Example

throw new ValidationError(
  'maxTokens must be a positive number',
  'maxTokens'
);

Extends

Constructors

Constructor

new ValidationError(message, field): ValidationError;

Defined in: errors.ts:182

Parameters

Parameter Type
message string
field string

Returns

ValidationError

Overrides

AgentError.constructor

Properties

cause?

readonly optional cause?: Error;

Defined in: errors.ts:17

Inherited from

AgentError.cause

field

readonly field: string;

Defined in: errors.ts:184