ขณะนี้
เส้นทาง API ที่ต้องการมีให้บริการเฉพาะลูกค้าบางรายเท่านั้น
ติดต่อฝ่ายขายเพื่อดูข้อมูลเพิ่มเติม
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-08-29 UTC
[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2025-08-29 UTC"],[[["\u003cp\u003eThe \u003ccode\u003eStatus\u003c/code\u003e type defines a logical error model suitable for REST APIs and RPC APIs, providing error code, message, and details.\u003c/p\u003e\n"],["\u003cp\u003eIt utilizes gRPC and aligns with the API Design Guide for error handling.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eStatus\u003c/code\u003e messages contain \u003ccode\u003ecode\u003c/code\u003e for enum value of error, \u003ccode\u003emessage\u003c/code\u003e for developer-facing description, and \u003ccode\u003edetails\u003c/code\u003e for further specifics.\u003c/p\u003e\n"]]],["The `Status` message, used in REST and RPC APIs like gRPC, defines a logical error model. It comprises three data points: an `int32` error `code`, a developer-facing `string` `message` in English, and a `details` field containing a list of error messages. The `code` represents an enumerated value, the `message` is meant for developers, while `details` carry specifics for a given error. End-users are meant to receive localized messages.\n"],null,[]]