Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Jenis Status menentukan model error logis yang cocok untuk berbagai lingkungan pemrograman, meliputi REST API dan RPC API. Jenis error ini digunakan oleh gRPC. Setiap pesan Status berisi tiga bagian data: kode error, pesan error, dan detail error.
Anda dapat mencari tahu lebih lanjut tentang model error ini dan cara penanganannya di Panduan Desain API.
Kode status, harus berupa nilai enum dari google.rpc.Code.
message
string
Pesan error yang ditampilkan ke developer dan seharusnya dalam bahasa Inggris. Setiap pesan error yang ditampilkan kepada pengguna harus dilokalkan dan dikirim di kolom google.rpc.Status.details, atau dilokalkan oleh klien.
details[]
object
Daftar pesan yang membawa detail error. Ada seperangkat jenis pesan umum untuk digunakan API.
Objek yang berisi kolom tipe arbitrer. Kolom tambahan "@type" berisi URI yang mengidentifikasi jenis. Contoh: { "id": 1234, "@type": "types.example.com/standard/id" }.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-07-31 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eStatus\u003c/code\u003e type is a logical error model suitable for various programming environments, such as REST and RPC APIs, and is utilized by gRPC.\u003c/p\u003e\n"],["\u003cp\u003eEach \u003ccode\u003eStatus\u003c/code\u003e message includes an error code, a developer-facing error message in English, and error details.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ecode\u003c/code\u003e field represents the status code, which should align with an enum value from \u003ccode\u003egoogle.rpc.Code\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003edetails\u003c/code\u003e field is a list of objects that contain arbitrary data, including an \u003ccode\u003e@type\u003c/code\u003e field that specifies the type.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eStatus\u003c/code\u003e type's JSON representation includes \u003ccode\u003ecode\u003c/code\u003e as an integer, \u003ccode\u003emessage\u003c/code\u003e as a string, and \u003ccode\u003edetails\u003c/code\u003e as an array of objects, each with an \u003ccode\u003e@type\u003c/code\u003e field.\u003c/p\u003e\n"]]],[],null,["# Status\n\nThe `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details.\n\nYou can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors)."]]