CustomErrorData interface
Stay organized with collections
Save and categorize content based on your preferences.
Details object that contains data originating from a bad HTTP response.
Signature:
export interface CustomErrorData
Properties
CustomErrorData.errorDetails
Optional additional details about the error.
Signature:
errorDetails?: ErrorDetails[];
CustomErrorData.response
Response from a GenerateContentRequest
Signature:
response?: GenerateContentResponse;
CustomErrorData.status
HTTP status code of the error response.
Signature:
status?: number;
CustomErrorData.statusText
HTTP status text of the error response.
Signature:
statusText?: string;
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,["# CustomErrorData interface\n\nDetails object that contains data originating from a bad HTTP response.\n\n**Signature:** \n\n export interface CustomErrorData \n\nProperties\n----------\n\n| Property | Type | Description |\n|---------------------------------------------------------------------|----------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------|\n| [errorDetails](./ai.customerrordata.md#customerrordataerrordetails) | [ErrorDetails](./ai.errordetails.md#errordetails_interface)\\[\\] | Optional additional details about the error. |\n| [response](./ai.customerrordata.md#customerrordataresponse) | [GenerateContentResponse](./ai.generatecontentresponse.md#generatecontentresponse_interface) | Response from a [GenerateContentRequest](./ai.generatecontentrequest.md#generatecontentrequest_interface) |\n| [status](./ai.customerrordata.md#customerrordatastatus) | number | HTTP status code of the error response. |\n| [statusText](./ai.customerrordata.md#customerrordatastatustext) | string | HTTP status text of the error response. |\n\nCustomErrorData.errorDetails\n----------------------------\n\nOptional additional details about the error.\n\n**Signature:** \n\n errorDetails?: ErrorDetails[];\n\nCustomErrorData.response\n------------------------\n\nResponse from a [GenerateContentRequest](./ai.generatecontentrequest.md#generatecontentrequest_interface)\n\n**Signature:** \n\n response?: GenerateContentResponse;\n\nCustomErrorData.status\n----------------------\n\nHTTP status code of the error response.\n\n**Signature:** \n\n status?: number;\n\nCustomErrorData.statusText\n--------------------------\n\nHTTP status text of the error response.\n\n**Signature:** \n\n statusText?: string;"]]