AIError class
Stay organized with collections
Save and categorize content based on your preferences.
Error class for the Firebase AI SDK.
Signature:
export declare class AIError extends FirebaseError
Extends: FirebaseError
Constructors
Properties
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 |
The error code from AIErrorCode. |
message |
string |
A human-readable message describing the error. |
customErrorData |
CustomErrorData | undefined |
Optional error data. |
AIError.code
Signature:
readonly code: AIErrorCode;
AIError.customErrorData
Signature:
readonly customErrorData?: CustomErrorData | undefined;
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-20 UTC.
[null,null,["Last updated 2025-05-20 UTC."],[],[],null,["# AIError class\n\nError class for the Firebase AI SDK.\n\n**Signature:** \n\n export declare class AIError extends FirebaseError \n\n**Extends:** [FirebaseError](./util.firebaseerror.md#firebaseerror_class)\n\nConstructors\n------------\n\n| Constructor | Modifiers | Description |\n|-------------------------------------------------------------------------------------|-----------|---------------------------------------------------|\n| [(constructor)(code, message, customErrorData)](./ai.aierror.md#aierrorconstructor) | | Constructs a new instance of the `AIError` class. |\n\nProperties\n----------\n\n| Property | Modifiers | Type | Description |\n|-----------------------------------------------------------|-----------|-----------------------------------------------------------------------------------|-------------|\n| [code](./ai.aierror.md#aierrorcode) | | [AIErrorCode](./ai.md#aierrorcode) | |\n| [customErrorData](./ai.aierror.md#aierrorcustomerrordata) | | [CustomErrorData](./ai.customerrordata.md#customerrordata_interface) \\| undefined | |\n\nAIError.(constructor)\n---------------------\n\nConstructs a new instance of the `AIError` class.\n\n**Signature:** \n\n constructor(code: AIErrorCode, message: string, customErrorData?: CustomErrorData | undefined);\n\n#### Parameters\n\n| Parameter | Type | Description |\n|-----------------|-----------------------------------------------------------------------------------|---------------------------------------------------------|\n| code | [AIErrorCode](./ai.md#aierrorcode) | The error code from [AIErrorCode](./ai.md#aierrorcode). |\n| message | string | A human-readable message describing the error. |\n| customErrorData | [CustomErrorData](./ai.customerrordata.md#customerrordata_interface) \\| undefined | Optional error data. |\n\nAIError.code\n------------\n\n**Signature:** \n\n readonly code: AIErrorCode;\n\nAIError.customErrorData\n-----------------------\n\n**Signature:** \n\n readonly customErrorData?: CustomErrorData | undefined;"]]