Skip to content

Commit af865bb

Browse files
committed
Update reference documentation
1 parent b9caefe commit af865bb

File tree

4 files changed

+75
-74
lines changed

4 files changed

+75
-74
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
Project: /docs/reference/js/_project.yaml
2+
Book: /docs/reference/_book.yaml
3+
page_type: reference
4+
5+
{% comment %}
6+
DO NOT EDIT THIS FILE!
7+
This is generated by the JS SDK team, and any local changes will be
8+
overwritten. Changes should be made in the source code at
9+
https://github.com/firebase/firebase-js-sdk
10+
{% endcomment %}
11+
12+
# CustomErrorData interface
13+
Details object that contains data originating from a bad HTTP response.
14+
15+
<b>Signature:</b>
16+
17+
```typescript
18+
export interface CustomErrorData
19+
```
20+
21+
## Properties
22+
23+
| Property | Type | Description |
24+
| --- | --- | --- |
25+
| [errorDetails](./vertexai-preview.customerrordata.md#customerrordataerrordetails) | [ErrorDetails](./vertexai-preview.errordetails.md#errordetails_interface)<!-- -->\[\] | Optional additional details about the error. |
26+
| [response](./vertexai-preview.customerrordata.md#customerrordataresponse) | [GenerateContentResponse](./vertexai-preview.generatecontentresponse.md#generatecontentresponse_interface) | Response from a [GenerateContentRequest](./vertexai-preview.generatecontentrequest.md#generatecontentrequest_interface) |
27+
| [status](./vertexai-preview.customerrordata.md#customerrordatastatus) | number | HTTP status code of the error response. |
28+
| [statusText](./vertexai-preview.customerrordata.md#customerrordatastatustext) | string | HTTP status text of the error response. |
29+
30+
## CustomErrorData.errorDetails
31+
32+
Optional additional details about the error.
33+
34+
<b>Signature:</b>
35+
36+
```typescript
37+
errorDetails?: ErrorDetails[];
38+
```
39+
40+
## CustomErrorData.response
41+
42+
Response from a [GenerateContentRequest](./vertexai-preview.generatecontentrequest.md#generatecontentrequest_interface)
43+
44+
<b>Signature:</b>
45+
46+
```typescript
47+
response?: GenerateContentResponse;
48+
```
49+
50+
## CustomErrorData.status
51+
52+
HTTP status code of the error response.
53+
54+
<b>Signature:</b>
55+
56+
```typescript
57+
status?: number;
58+
```
59+
60+
## CustomErrorData.statusText
61+
62+
HTTP status text of the error response.
63+
64+
<b>Signature:</b>
65+
66+
```typescript
67+
statusText?: string;
68+
```

docs-devsite/vertexai-preview.httperrordetails.md

Lines changed: 0 additions & 57 deletions
This file was deleted.

docs-devsite/vertexai-preview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ The Vertex AI For Firebase Web SDK.
5454
| [Content](./vertexai-preview.content.md#content_interface) | Content type for both prompts and response candidates. |
5555
| [CountTokensRequest](./vertexai-preview.counttokensrequest.md#counttokensrequest_interface) | Params for calling [GenerativeModel.countTokens()](./vertexai-preview.generativemodel.md#generativemodelcounttokens) |
5656
| [CountTokensResponse](./vertexai-preview.counttokensresponse.md#counttokensresponse_interface) | Response from calling [GenerativeModel.countTokens()](./vertexai-preview.generativemodel.md#generativemodelcounttokens)<!-- -->. |
57+
| [CustomErrorData](./vertexai-preview.customerrordata.md#customerrordata_interface) | Details object that contains data originating from a bad HTTP response. |
5758
| [Date\_2](./vertexai-preview.date_2.md#date_2_interface) | Protobuf google.type.Date |
5859
| [EnhancedGenerateContentResponse](./vertexai-preview.enhancedgeneratecontentresponse.md#enhancedgeneratecontentresponse_interface) | Response object wrapped with helper methods. |
5960
| [ErrorDetails](./vertexai-preview.errordetails.md#errordetails_interface) | Details object that may be included in an error response. |
@@ -77,7 +78,6 @@ The Vertex AI For Firebase Web SDK.
7778
| [GenerativeContentBlob](./vertexai-preview.generativecontentblob.md#generativecontentblob_interface) | Interface for sending an image. |
7879
| [GroundingAttribution](./vertexai-preview.groundingattribution.md#groundingattribution_interface) | |
7980
| [GroundingMetadata](./vertexai-preview.groundingmetadata.md#groundingmetadata_interface) | Metadata returned to client when grounding is enabled. |
80-
| [HTTPErrorDetails](./vertexai-preview.httperrordetails.md#httperrordetails_interface) | Details object that contains data originating from a bad HTTP response. |
8181
| [InlineDataPart](./vertexai-preview.inlinedatapart.md#inlinedatapart_interface) | Content part interface if the part represents an image. |
8282
| [ModelParams](./vertexai-preview.modelparams.md#modelparams_interface) | Params passed to [getGenerativeModel()](./vertexai-preview.md#getgenerativemodel_e3037c9)<!-- -->. |
8383
| [PromptFeedback](./vertexai-preview.promptfeedback.md#promptfeedback_interface) | If the prompt was blocked, this will be populated with <code>blockReason</code> and the relevant <code>safetyRatings</code>. |

docs-devsite/vertexai-preview.vertexaierror.md

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,14 @@ export declare class VertexAIError extends FirebaseError
2323
2424
| Constructor | Modifiers | Description |
2525
| --- | --- | --- |
26-
| [(constructor)(code, message, httpErrorDetails, generateContentResponse)](./vertexai-preview.vertexaierror.md#vertexaierrorconstructor) | | Creates a new VertexAIError instance. |
26+
| [(constructor)(code, message, customErrorData)](./vertexai-preview.vertexaierror.md#vertexaierrorconstructor) | | Creates a new VertexAIError instance. |
2727
2828
## Properties
2929
3030
| Property | Modifiers | Type | Description |
3131
| --- | --- | --- | --- |
3232
| [code](./vertexai-preview.vertexaierror.md#vertexaierrorcode) | | [VertexAIErrorCode](./vertexai-preview.md#vertexaierrorcode) | |
33-
| [generateContentResponse](./vertexai-preview.vertexaierror.md#vertexaierrorgeneratecontentresponse) | | [GenerateContentResponse](./vertexai-preview.generatecontentresponse.md#generatecontentresponse_interface) \| undefined | |
34-
| [httpErrorDetails](./vertexai-preview.vertexaierror.md#vertexaierrorhttperrordetails) | | [HTTPErrorDetails](./vertexai-preview.httperrordetails.md#httperrordetails_interface) \| undefined | |
33+
| [customErrorData](./vertexai-preview.vertexaierror.md#vertexaierrorcustomerrordata) | | [CustomErrorData](./vertexai-preview.customerrordata.md#customerrordata_interface) \| undefined | |
3534
| [message](./vertexai-preview.vertexaierror.md#vertexaierrormessage) | | string | |
3635
3736
## VertexAIError.(constructor)
@@ -41,7 +40,7 @@ Creates a new VertexAIError instance.
4140
<b>Signature:</b>
4241
4342
```typescript
44-
constructor(code: VertexAIErrorCode, message: string, httpErrorDetails?: HTTPErrorDetails | undefined, generateContentResponse?: GenerateContentResponse | undefined);
43+
constructor(code: VertexAIErrorCode, message: string, customErrorData?: CustomErrorData | undefined);
4544
```
4645
4746
#### Parameters
@@ -50,8 +49,7 @@ constructor(code: VertexAIErrorCode, message: string, httpErrorDetails?: HTTPErr
5049
| --- | --- | --- |
5150
| code | [VertexAIErrorCode](./vertexai-preview.md#vertexaierrorcode) | The error code from [VertexAIErrorCode](./vertexai-preview.md#vertexaierrorcode)<!-- -->. |
5251
| message | string | A human-readable message describing the error. |
53-
| httpErrorDetails | [HTTPErrorDetails](./vertexai-preview.httperrordetails.md#httperrordetails_interface) \| undefined | |
54-
| generateContentResponse | [GenerateContentResponse](./vertexai-preview.generatecontentresponse.md#generatecontentresponse_interface) \| undefined | Optional response from a [GenerateContentRequest](./vertexai-preview.generatecontentrequest.md#generatecontentrequest_interface)<!-- -->. |
52+
| customErrorData | [CustomErrorData](./vertexai-preview.customerrordata.md#customerrordata_interface) \| undefined | Optional error data. |
5553
5654
## VertexAIError.code
5755
@@ -61,20 +59,12 @@ constructor(code: VertexAIErrorCode, message: string, httpErrorDetails?: HTTPErr
6159
readonly code: VertexAIErrorCode;
6260
```
6361
64-
## VertexAIError.generateContentResponse
62+
## VertexAIError.customErrorData
6563
6664
<b>Signature:</b>
6765
6866
```typescript
69-
readonly generateContentResponse?: GenerateContentResponse | undefined;
70-
```
71-
72-
## VertexAIError.httpErrorDetails
73-
74-
<b>Signature:</b>
75-
76-
```typescript
77-
readonly httpErrorDetails?: HTTPErrorDetails | undefined;
67+
readonly customErrorData?: CustomErrorData | undefined;
7868
```
7969
8070
## VertexAIError.message

0 commit comments

Comments
 (0)