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 และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2022-09-26 UTC
[null,null,["อัปเดตล่าสุด 2022-09-26 UTC"],[[["The `Status` type defines a logical error model used by gRPC for REST and RPC APIs, containing an error code, message, and details."],["Each `Status` message includes a status code, a developer-facing error message, and a list of error details carried in messages."],["Developers can learn more about this error model in the API Design Guide, and user-facing messages should be localized."]]],["The `Status` message, used in environments like REST and RPC APIs, defines a logical error model. It conveys errors through three data points: `code` (an integer representing the error type), `message` (a developer-facing English error description), and `details[]` (a list of messages providing further error information). User-facing error messages should be localized and sent in the details field, or localized by the client. This status is used by gRPC.\n"]]