ChatAppLogEntry
بار JSON از پیام های خطا. اگر Cloud Logging API فعال باشد، این پیامهای خطا در Google Cloud Logging ثبت میشوند.
نمایندگی JSON |
---|
{
"deployment": string,
"error": {
object (Status )
},
"deploymentFunction": string
} |
فیلدها |
---|
deployment | string استقرار که باعث خطا شد. برای برنامههای چت ساخته شده در Apps Script، این شناسه استقرار تعریف شده توسط Apps Script است. |
error | object ( Status ) کد خطا و پیام |
deploymentFunction | string نام callback_method رمزگذاری نشده ای که در هنگام بروز خطا در حال اجرا بود. |
وضعیت
نوع Status
یک مدل خطای منطقی را تعریف می کند که برای محیط های برنامه نویسی مختلف، از جمله REST API و RPC API مناسب است. توسط gRPC استفاده می شود. هر پیام Status
شامل سه داده است: کد خطا، پیام خطا و جزئیات خطا.
در راهنمای طراحی API میتوانید درباره این مدل خطا و نحوه کار با آن اطلاعات بیشتری کسب کنید.
نمایندگی JSON |
---|
{
"code": integer,
"message": string,
"details": [
{
"@type": string,
field1: ...,
...
}
]
} |
فیلدها |
---|
code | integer کد وضعیت، که باید مقداری از google.rpc.Code باشد. |
message | string یک پیغام خطای برنامهنویس، که باید به زبان انگلیسی باشد. هر پیام خطای کاربر باید بومی سازی شده و در قسمت google.rpc.Status.details ارسال شود یا توسط مشتری بومی سازی شود. |
details[] | object لیستی از پیام هایی که حاوی جزئیات خطا هستند. مجموعه ای متداول از انواع پیام ها برای استفاده API ها وجود دارد. |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-02-27 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-02-27 بهوقت ساعت هماهنگ جهانی."],[[["Chat app error messages are logged to Google Cloud Logging if the API is enabled, providing details on the deployment, error, and function involved."],["Error messages utilize a standardized `Status` format, including an error code, message, and optional details for comprehensive debugging."],["The `Status` format aligns with gRPC and Google API Design Guide principles for consistent error handling across different programming environments."]]],["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"]]