Tên callback_method chưa mã hoá đang chạy khi gặp lỗi.
Trạng thái
Loại Status xác định một mô hình lỗi logic phù hợp với nhiều môi trường lập trình, bao gồm cả API REST và API RPC. gRPC sử dụng lớp này. Mỗi thông báo Status chứa 3 phần dữ liệu: mã lỗi, thông báo lỗi và thông tin chi tiết về lỗi.
Bạn có thể tìm hiểu thêm về mô hình lỗi này và cách xử lý mô hình lỗi này trong Hướng dẫn thiết kế API.
Thông báo lỗi dành cho nhà phát triển, phải bằng tiếng Anh. Mọi thông báo lỗi hiển thị với người dùng đều phải được bản địa hoá và gửi trong trường google.rpc.Status.details hoặc do ứng dụng bản địa hoá.
details[]
object
Danh sách thông báo chứa thông tin chi tiết về lỗi. Có một bộ các loại thông báo phổ biến để API sử dụng.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-02-27 UTC."],[[["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"]]