Status
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Status
türü, REST API'ler ve RPC API'leri dahil olmak üzere farklı programlama ortamları için uygun bir mantıksal hata modelini tanımlar. gRPC tarafından kullanılır. Her Status
mesajı üç veri parçası içerir: hata kodu, hata mesajı ve hata ayrıntıları.
API Tasarım Kılavuzu'nda bu hata modeli ve bu hata modeliyle nasıl çalışılacağı hakkında daha fazla bilgi edinebilirsiniz.
JSON gösterimi |
{
"code": integer,
"message": string,
"details": [
{
"@type": string,
field1: ...,
...
}
]
} |
Alanlar |
code |
integer
google.rpc.Code olması gereken durum kodu.
|
message |
string
Geliştiricilere yönelik, İngilizce olması gereken bir hata mesajı. Kullanıcılara yönelik tüm hata mesajları yerelleştirilip google.rpc.Status.details alanında gönderilmeli veya istemci tarafından yerelleştirilmelidir.
|
details[] |
object
Hata ayrıntılarını içeren mesajların listesi. API'lerin kullandığı bir dizi mesaj türü vardır. Rastgele türden alanlar içeren nesne. Ek bir "@type" alanı, türü tanımlayan bir URI içerir. Örnek: { "id": 1234, "@type": "types.example.com/standard/id" } .
|
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2024-09-10 UTC.
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2024-09-10 UTC."],[[["The `Status` type is a standard error model used by gRPC and REST APIs to represent errors with a code, message, and optional details."],["Each `Status` object includes an integer `code` from `google.rpc.Code`, a developer-facing `message`, and an array of `details` for further information."],["The `details` field allows for structured error data using custom types identified by a `@type` URI."]]],["The `Status` type represents a logical error model with three data components: `code`, `message`, and `details`. `code` is an integer status code, `message` is a developer-facing English error message, and `details` is a list of objects providing further error information, each specifying its type via `\"@type\"`. The JSON representation uses these fields to structure error messages. User-facing messages should be localized.\n"]]