ModelError
Defined in: src/errors.ts:18
Base exception class for all model-related errors.
This class serves as the common base type for errors that originate from model provider interactions. By catching ModelError, consumers can handle all model-related errors uniformly while still having access to specific error types through instanceof checks.
Extends
Section titled “Extends”Error
Extended by
Section titled “Extended by”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ModelError(message, options?): ModelError;Defined in: src/errors.ts:25
Creates a new ModelError.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
message | string | Error message describing the model error |
options? | { cause?: unknown; } | Optional error options including the cause |
options.cause? | unknown | - |
Returns
Section titled “Returns”ModelError
Overrides
Section titled “Overrides”Error.constructor