-
Notifications
You must be signed in to change notification settings - Fork 897
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
653 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@firebase/vertexai-preview': patch | ||
--- | ||
|
||
Add a publicly exported `VertexAIError` class. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
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 %} | ||
|
||
# CustomErrorData interface | ||
Details object that contains data originating from a bad HTTP response. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export interface CustomErrorData | ||
``` | ||
|
||
## Properties | ||
|
||
| Property | Type | Description | | ||
| --- | --- | --- | | ||
| [errorDetails](./vertexai-preview.customerrordata.md#customerrordataerrordetails) | [ErrorDetails](./vertexai-preview.errordetails.md#errordetails_interface)<!-- -->\[\] | Optional additional details about the error. | | ||
| [response](./vertexai-preview.customerrordata.md#customerrordataresponse) | [GenerateContentResponse](./vertexai-preview.generatecontentresponse.md#generatecontentresponse_interface) | Response from a [GenerateContentRequest](./vertexai-preview.generatecontentrequest.md#generatecontentrequest_interface) | | ||
| [status](./vertexai-preview.customerrordata.md#customerrordatastatus) | number | HTTP status code of the error response. | | ||
| [statusText](./vertexai-preview.customerrordata.md#customerrordatastatustext) | string | HTTP status text of the error response. | | ||
|
||
## CustomErrorData.errorDetails | ||
|
||
Optional additional details about the error. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
errorDetails?: ErrorDetails[]; | ||
``` | ||
|
||
## CustomErrorData.response | ||
|
||
Response from a [GenerateContentRequest](./vertexai-preview.generatecontentrequest.md#generatecontentrequest_interface) | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
response?: GenerateContentResponse; | ||
``` | ||
|
||
## CustomErrorData.status | ||
|
||
HTTP status code of the error response. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
status?: number; | ||
``` | ||
|
||
## CustomErrorData.statusText | ||
|
||
HTTP status text of the error response. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
statusText?: string; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
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 %} | ||
|
||
# ErrorDetails interface | ||
Details object that may be included in an error response. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export interface ErrorDetails | ||
``` | ||
|
||
## Properties | ||
|
||
| Property | Type | Description | | ||
| --- | --- | --- | | ||
| ["@type"](./vertexai-preview.errordetails.md#errordetails"@type") | string | | | ||
| [domain](./vertexai-preview.errordetails.md#errordetailsdomain) | string | The domain where the error occured. | | ||
| [metadata](./vertexai-preview.errordetails.md#errordetailsmetadata) | Record<string, unknown> | Additonal metadata about the error. | | ||
| [reason](./vertexai-preview.errordetails.md#errordetailsreason) | string | The reason for the error. | | ||
|
||
## ErrorDetails."@type" | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
'@type'?: string; | ||
``` | ||
|
||
## ErrorDetails.domain | ||
|
||
The domain where the error occured. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
domain?: string; | ||
``` | ||
|
||
## ErrorDetails.metadata | ||
|
||
Additonal metadata about the error. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
metadata?: Record<string, unknown>; | ||
``` | ||
|
||
## ErrorDetails.reason | ||
|
||
The reason for the error. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
reason?: string; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
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 %} | ||
|
||
# VertexAIError class | ||
Error class for the Vertex AI for Firebase SDK. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export declare class VertexAIError extends FirebaseError | ||
``` | ||
<b>Extends:</b> [FirebaseError](./util.firebaseerror.md#firebaseerror_class) | ||
## Constructors | ||
| Constructor | Modifiers | Description | | ||
| --- | --- | --- | | ||
| [(constructor)(code, message, customErrorData)](./vertexai-preview.vertexaierror.md#vertexaierrorconstructor) | | Constructs a new instance of the <code>VertexAIError</code> class. | | ||
## Properties | ||
| Property | Modifiers | Type | Description | | ||
| --- | --- | --- | --- | | ||
| [code](./vertexai-preview.vertexaierror.md#vertexaierrorcode) | | [VertexAIErrorCode](./vertexai-preview.md#vertexaierrorcode) | | | ||
| [customErrorData](./vertexai-preview.vertexaierror.md#vertexaierrorcustomerrordata) | | [CustomErrorData](./vertexai-preview.customerrordata.md#customerrordata_interface) \| undefined | | | ||
| [message](./vertexai-preview.vertexaierror.md#vertexaierrormessage) | | string | | | ||
## VertexAIError.(constructor) | ||
Constructs a new instance of the `VertexAIError` class. | ||
<b>Signature:</b> | ||
```typescript | ||
constructor(code: VertexAIErrorCode, message: string, customErrorData?: CustomErrorData | undefined); | ||
``` | ||
#### Parameters | ||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| code | [VertexAIErrorCode](./vertexai-preview.md#vertexaierrorcode) | The error code from [VertexAIErrorCode](./vertexai-preview.md#vertexaierrorcode)<!-- -->. | | ||
| message | string | A human-readable message describing the error. | | ||
| customErrorData | [CustomErrorData](./vertexai-preview.customerrordata.md#customerrordata_interface) \| undefined | Optional error data. | | ||
## VertexAIError.code | ||
<b>Signature:</b> | ||
```typescript | ||
readonly code: VertexAIErrorCode; | ||
``` | ||
## VertexAIError.customErrorData | ||
<b>Signature:</b> | ||
```typescript | ||
readonly customErrorData?: CustomErrorData | undefined; | ||
``` | ||
## VertexAIError.message | ||
<b>Signature:</b> | ||
```typescript | ||
readonly message: string; | ||
``` |
Oops, something went wrong.