Error class for the Firebase AI SDK.

**Signature:**

    export declare class AIError extends FirebaseError 

**Extends:** [FirebaseError](https://firebase.google.com/docs/reference/js/util.firebaseerror#firebaseerror_class)

## Constructors

| Constructor | Modifiers | Description |
|---|---|---|
| [(constructor)(code, message, customErrorData)](https://firebase.google.com/docs/reference/js/ai.aierror#aierrorconstructor) |   | Constructs a new instance of the `AIError` class. |

## Properties

| Property | Modifiers | Type | Description |
|---|---|---|---|
| [code](https://firebase.google.com/docs/reference/js/ai.aierror#aierrorcode) |   | [AIErrorCode](https://firebase.google.com/docs/reference/js/ai#aierrorcode) |   |
| [customErrorData](https://firebase.google.com/docs/reference/js/ai.aierror#aierrorcustomerrordata) |   | [CustomErrorData](https://firebase.google.com/docs/reference/js/ai.customerrordata#customerrordata_interface) \| undefined |   |

## AIError.(constructor)

Constructs a new instance of the `AIError` class.

**Signature:**

    constructor(code: AIErrorCode, message: string, customErrorData?: CustomErrorData | undefined);

#### Parameters

| Parameter | Type | Description |
|---|---|---|
| code | [AIErrorCode](https://firebase.google.com/docs/reference/js/ai#aierrorcode) | The error code from [AIErrorCode](https://firebase.google.com/docs/reference/js/ai#aierrorcode). |
| message | string | A human-readable message describing the error. |
| customErrorData | [CustomErrorData](https://firebase.google.com/docs/reference/js/ai.customerrordata#customerrordata_interface) \| undefined | Optional error data. |

## AIError.code

**Signature:**

    readonly code: AIErrorCode;

## AIError.customErrorData

**Signature:**

    readonly customErrorData?: CustomErrorData | undefined;