Back to Firebase Js Sdk

AIError class

docs-devsite/ai.aierror.md

12.12.11.9 KB
Original Source

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 %}

AIError class

Error class for the Firebase AI SDK.

<b>Signature:</b>

typescript
export declare class AIError extends FirebaseError 

<b>Extends:</b> FirebaseError

Constructors

ConstructorModifiersDescription
(constructor)(code, message, customErrorData)Constructs a new instance of the <code>AIError</code> class.

Properties

PropertyModifiersTypeDescription
codeAIErrorCode
customErrorDataCustomErrorData | undefined

AIError.(constructor)

Constructs a new instance of the AIError class.

<b>Signature:</b>

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

Parameters

ParameterTypeDescription
codeAIErrorCodeThe error code from AIErrorCode<!-- -->.
messagestringA human-readable message describing the error.
customErrorDataCustomErrorData | undefinedOptional error data.

AIError.code

<b>Signature:</b>

typescript
readonly code: AIErrorCode;

AIError.customErrorData

<b>Signature:</b>

typescript
readonly customErrorData?: CustomErrorData | undefined;