class

AI::Provider::AISDKError

Inherits Exception < Reference < Object

Base error class for all AI SDK errors.

All AI SDK specific errors inherit from this class, allowing for consistent error handling and type checking.

Constructors

new(*, name : String, message : String, cause : Exception | Nil = nil)

Creates a new AISDKError.

Parameters:

  • name: The name of the error type
  • message: The error message
  • cause: Optional underlying exception that caused this error
Source

Class methods

instance?(error) : Bool

Checks if the given value is an instance of AISDKError.

This method enables checking if an error is an AI SDK error without needing direct type comparison.

Source

Instance methods

name

The name of the error type (e.g., "AI_APICallError").

Source
to_s(io : IO) : Nil

Returns a string representation of the error.

Source