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 bir mantıksal hata modeli tanımlar. gRPC tarafından kullanılır. Her Status
mesajı üç veri içerir: hata kodu, hata mesajı ve hata ayrıntıları.
Bu hata modeli ve nasıl kullanılacağı hakkında daha fazla bilgiyi API Tasarım Kılavuzu'nda bulabilirsiniz.
Alanlar |
code |
int32
Durum kodu, google.rpc.Code numaralı enum değeri olmalıdır.
|
message |
string
Geliştiricilere yönelik hata mesajı (İngilizce olmalıdır). Kullanıcıya gösterilen 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 ileti türleri kümesi 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."],[[["\u003cp\u003eThe \u003ccode\u003eStatus\u003c/code\u003e type defines a logical error model suitable for various programming environments, including REST and RPC APIs, and is used by gRPC.\u003c/p\u003e\n"],["\u003cp\u003eEach \u003ccode\u003eStatus\u003c/code\u003e message comprises three data components: an error code, an error message, and error details.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ecode\u003c/code\u003e field represents the status code and is expected to be an enum value of \u003ccode\u003egoogle.rpc.Code\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003emessage\u003c/code\u003e field provides a developer-facing error message in English, with user-facing messages expected to be localized elsewhere.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003edetails[]\u003c/code\u003e field contains a list of messages that provide further information about the error.\u003c/p\u003e\n"]]],[],null,["# Package google.rpc\n\nIndex\n-----\n\n- [Status](/maps/tt/route-optimization/experimental/u-turn-avoidance/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/u-turn-avoidance/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. |"]]