Package google.rpc
สถานะ
ประเภท Status
จะกำหนดรูปแบบข้อผิดพลาดเชิงตรรกะที่เหมาะสมกับสภาพแวดล้อมการเขียนโปรแกรมต่างๆ ซึ่งรวมถึง REST API และ RPC API gRPC จะใช้โปรโตคอลนี้ ข้อความ Status
แต่ละรายการมีข้อมูล 3 รายการ ได้แก่ รหัสข้อผิดพลาด ข้อความแสดงข้อผิดพลาด และรายละเอียดข้อผิดพลาด
ดูข้อมูลเพิ่มเติมเกี่ยวกับรูปแบบข้อผิดพลาดนี้และวิธีจัดการได้ในคู่มือการออกแบบ API
ช่อง |
code |
int32
รหัสสถานะ ซึ่งควรเป็นค่า enum ของ google.rpc.Code
|
message |
string
ข้อความแสดงข้อผิดพลาดที่แสดงต่อนักพัฒนาแอป ซึ่งควรเป็นภาษาอังกฤษ ข้อความแสดงข้อผิดพลาดที่แสดงต่อผู้ใช้ควรได้รับการแปลและส่งในช่อง google.rpc.Status.details หรือลูกค้าเป็นผู้แปล
|
details[] |
Any
รายการข้อความที่มีรายละเอียดข้อผิดพลาด มีชุดประเภทข้อความทั่วไปสำหรับ API ต่างๆ ที่จะใช้ได้
|
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-02-10 UTC
[null,null,["อัปเดตล่าสุด 2025-02-10 UTC"],[[["The `Status` type defines a logical error model suitable for REST APIs and RPC APIs, and is used by gRPC."],["Each `Status` message contains an error code, message, and details, providing comprehensive error information."],["Developers can access further information about the error model and its usage in the API Design Guide."]]],["The `Status` message, used in REST and RPC APIs like gRPC, defines a logical error model. It comprises three data points: `code` (an integer representing the error), `message` (a developer-facing English error description), and `details` (a list of messages carrying specific error information). The `details` can contain user-facing localized error messages. The status code is a `google.rpc.Code` enum value.\n"]]