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'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ı.
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 değeri 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."],[[["\u003cp\u003eThe \u003ccode\u003eStatus\u003c/code\u003e type defines a logical error model suitable for various programming environments, including REST and RPC APIs.\u003c/p\u003e\n"],["\u003cp\u003eEach \u003ccode\u003eStatus\u003c/code\u003e message includes three data components: an error code, an error message, and error details.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ecode\u003c/code\u003e field in \u003ccode\u003eStatus\u003c/code\u003e is an integer representing the error code as defined in \u003ccode\u003egoogle.rpc.Code\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003emessage\u003c/code\u003e field is a developer-facing English error message, while user-facing messages should be localized.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003edetails\u003c/code\u003e field contains a list of messages that provide additional information about the error.\u003c/p\u003e\n"]]],[],null,["# Package google.rpc\n\nIndex\n-----\n\n- [Status](/maps/tt/route-optimization/experimental/load-cost/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/load-cost/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. |"]]