ChatAppLogEntry
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Ładunek JSON komunikatów o błędach. Jeśli interfejs Cloud Logging API jest włączony, te komunikaty o błędach są rejestrowane w Google Cloud Logging.
Zapis JSON |
{
"deployment": string,
"error": {
object (Status )
},
"deploymentFunction": string
} |
Pola |
deployment |
string
Wdrożenie, które spowodowało błąd. W przypadku aplikacji Google Chat utworzonych w Apps Script jest to identyfikator wdrożenia zdefiniowany przez Apps Script.
|
error |
object (Status )
Kod błędu i komunikat.
|
deploymentFunction |
string
Niezaszyfrowana nazwa callback_method , która była uruchomiona w momencie wystąpienia błędu.
|
Stan
Typ Status
definiuje model błędu logicznego, który jest odpowiedni dla różnych środowisk programowania, w tym interfejsów API typu REST i RPC. Jest używany przez gRPC. Każda wiadomość Status
zawiera 3 elementy danych: kod błędu, komunikat o błędzie i szczegóły błędu.
Więcej informacji o tym modelu błędów i o sposobach jego używania znajdziesz w przewodniku API Design Guide (w języku angielskim).
Zapis JSON |
{
"code": integer,
"message": string,
"details": [
{
"@type": string,
field1: ...,
...
}
]
} |
Pola |
code |
integer
Kod stanu, który powinien być wartością z enumeracji google.rpc.Code .
|
message |
string
Komunikat o błędzie dla programistów, który powinien być w języku angielskim. Komunikaty o błędach wyświetlane użytkownikom powinny być zlokalizowane i wysyłane w polu google.rpc.Status.details lub zlokalizowane przez klienta.
|
details[] |
object
Lista wiadomości zawierających szczegóły błędu. Interfejsy API mogą korzystać z wspólnego zestawu typów wiadomości.
|
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-25 UTC.
[null,null,["Ostatnia aktualizacja: 2025-07-25 UTC."],[[["\u003cp\u003eChat app error messages are logged to Google Cloud Logging if the API is enabled, providing details on the deployment, error, and function involved.\u003c/p\u003e\n"],["\u003cp\u003eError messages utilize a standardized \u003ccode\u003eStatus\u003c/code\u003e format, including an error code, message, and optional details for comprehensive debugging.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eStatus\u003c/code\u003e format aligns with gRPC and Google API Design Guide principles for consistent error handling across different programming environments.\u003c/p\u003e\n"]]],["Error messages are logged to Google Cloud Logging when the Cloud Logging API is enabled. Errors are represented in JSON with a deployment string, an error object (containing code, message, and details), and the deployment function name. The `Status` type defines the error model, including an integer `code`, a string `message`, and an array `details` for additional context. The `code` indicates the type of error, while the `message` provides a developer-facing explanation. The details array provides context about the error.\n"],null,["# ChatAppLogEntry\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n- [Status](#Status)\n - [JSON representation](#Status.SCHEMA_REPRESENTATION)\n\nJSON payload of error messages. If the Cloud Logging API is enabled, these error messages are logged to [Google Cloud Logging](https://cloud.google.com/logging/docs).\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"deployment\": string, \"error\": { object (/workspace/chat/api/reference/rest/v1/ChatAppLogEntry#Status) }, \"deploymentFunction\": string } ``` |\n\n| Fields ||\n|----------------------|--------------------------------------------------------------------------------------------------------------------------------------|\n| `deployment` | `string` The deployment that caused the error. For Chat apps built in Apps Script, this is the deployment ID defined by Apps Script. |\n| `error` | `object (`[Status](/workspace/chat/api/reference/rest/v1/ChatAppLogEntry#Status)`)` The error code and message. |\n| `deploymentFunction` | `string` The unencrypted `callback_method` name that was running when the error was encountered. |\n\nStatus\n------\n\nThe `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details.\n\nYou can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------|\n| ``` { \"code\": integer, \"message\": string, \"details\": [ { \"@type\": string, field1: ..., ... } ] } ``` |\n\n| Fields ||\n|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `code` | `integer` The status code, which should be an enum value of [google.rpc.Code](/workspace/chat/api/reference/rest/v1/spaces.messages#Message.Code). |\n| `message` | `string` A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details](/workspace/chat/api/reference/rest/v1/ChatAppLogEntry#Status.FIELDS.details) field, or localized by the client. |\n| `details[]` | `object` A list of messages that carry the error details. There is a common set of message types for APIs to use. |"]]