Package google.rpc
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Durum
Status
türü, REST API'leri ve RPC API'leri dahil olmak üzere farklı programlama ortamlarına uygun mantıksal bir hata modeli 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ı.
Bu hata modeli ve bu modelle nasıl çalışacağınız hakkında daha fazla bilgiyi API Tasarım Kılavuzu'nda bulabilirsiniz.
Alanlar |
code |
int32
Durum kodu. google.rpc.Code değerine sahip bir enum olmalıdır.
|
message |
string
Geliştiricilere yönelik, İngilizce bir hata mesajı. Kullanıcılara yönelik tüm hata mesajları yerelleştirilmeli ve google.rpc.Status.details alanında gönderilmeli veya istemci tarafından yerelleştirilmelidir.
|
details[] |
Any
Hata ayrıntılarını içeren mesajların listesi. API'lerin kullanabileceği ortak bir mesaj türü grubu vardır.
|
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: 2025-08-29 UTC.
[null,null,["Son güncelleme tarihi: 2025-08-29 UTC."],[],[],null,["# Package google.rpc\n\nIndex\n-----\n\n- [Status](/maps/tt/route-optimization/experimental/objectives/reference/rpc/google.rpc#google.rpc.Status) (message)\n\nStatus\n------\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).\n\n| Fields ||\n|-------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `code` | `int32` The status code, which should be an enum value of `google.rpc.Code`. |\n| `message` | `string` A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details](/maps/tt/route-optimization/experimental/objectives/reference/rpc/google.rpc#google.rpc.Status.FIELDS.repeated.google.protobuf.Any.google.rpc.Status.details) field, or localized by the client. |\n| `details[]` | [Any](https://protobuf.dev/reference/protobuf/google.protobuf/#any) A list of messages that carry the error details. There is a common set of message types for APIs to use. |"]]