docs-devsite/ai.aierror.md
Project: /docs/reference/js/_project.yaml Book: /docs/reference/_book.yaml page_type: reference
{% comment %} DO NOT EDIT THIS FILE! This is generated by the JS SDK team, and any local changes will be overwritten. Changes should be made in the source code at https://github.com/firebase/firebase-js-sdk {% endcomment %}
Error class for the Firebase AI SDK.
<b>Signature:</b>
export declare class AIError extends FirebaseError
<b>Extends:</b> FirebaseError
| Constructor | Modifiers | Description |
|---|---|---|
| (constructor)(code, message, customErrorData) | Constructs a new instance of the <code>AIError</code> class. |
| Property | Modifiers | Type | Description |
|---|---|---|---|
| code | AIErrorCode | ||
| customErrorData | CustomErrorData | undefined |
Constructs a new instance of the AIError class.
<b>Signature:</b>
constructor(code: AIErrorCode, message: string, customErrorData?: CustomErrorData | undefined);
| 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. |
<b>Signature:</b>
readonly code: AIErrorCode;
<b>Signature:</b>
readonly customErrorData?: CustomErrorData | undefined;