Action
    Preparing search index...

    Exception thrown when an AI model request fails. Wraps provider-specific HTTP errors with structured information about the failure, including the model name, HTTP status code, and any error detail extracted from the provider's response.

    2.5

    Hierarchy (View Summary)

    Index

    Methods

    • Casts this object to the specified type. Throws error on failure.

      Type Parameters

      • T1

        The target type of the cast.

      • T2

        The type of the object to cast.

      Parameters

      Returns T1

    • Determines whether the specified object is equal to the current object.

      Parameters

      • obj: any

        The object to compare with the current object.

      Returns boolean

      true if the specified object is equal to the current object; otherwise, false.

    • Serves as the default hash function.

      Returns number

      A hash code for the current object.

    • Returns a string that represents the current object.

      Returns string

      A string that represents the current object.

    • Casts this object to the specified type. Returns null on failure.

      Type Parameters

      • T1

        The target type of the cast.

      • T2

        The type of the object to cast.

      Parameters

      Returns T1 | null

    • Determines whether the specified object instances are considered equal.

      Parameters

      • objA: any

        The first object to compare.

      • objB: any

        The second object to compare.

      Returns boolean

      true if the objects are considered equal; otherwise, false. If both objA and objB are null, the method returns true.

    Extended capability 'AI'

    • get HttpStatusCode(): HttpStatusCode | null

      Gets the HTTP status code returned by the AI model provider, or null if no HTTP response was received.

      Returns HttpStatusCode | null

      2.5

    • get IsRetryable(): boolean

      Gets a value indicating whether the error is transient and may succeed if retried. Examples of retryable errors include rate limiting (429) and server errors (5xx).

      Returns boolean

      2.5

    • get ModelName(): string

      Gets the name of the AI model that produced the error.

      Returns string

      2.5

    • get ProviderErrorMessage(): string | null

      Gets the error detail extracted from the provider's response body, or null if none was available.

      Returns string | null

      2.5