Package google.rpc
Stan
Typ Status
definiuje model logiczny błędów odpowiedni dla różnych środowisk programowania, w tym interfejsy API REST i RPC. Jest on używany przez funkcję gRPC. Każda wiadomość Status
zawiera 3 elementy danych: kod błędu, komunikat o błędzie i szczegóły błędu.
Więcej informacji o tym modelu błędu i sposobie jego wykorzystania znajdziesz w przewodniku po interfejsach API.
Pola |
code |
int32
Kod stanu, który powinien być wartością google.rpc.Code .
|
message |
string
Komunikat o błędzie wyświetlany deweloperowi, który powinien być w języku angielskim. Wszelkie komunikaty o błędach wyświetlane użytkownikom powinny być zlokalizowane i wysyłane w polu google.rpc.Status.details lub zlokalizowane przez klienta.
|
details[] |
Any
Lista komunikatów zawierających szczegóły błędu. Istnieje wspólny zestaw typów wiadomości do użycia przez interfejsy API.
|
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2022-09-26 UTC.
[null,null,["Ostatnia aktualizacja: 2022-09-26 UTC."],[[["The `Status` type defines a logical error model used by gRPC for REST and RPC APIs, containing an error code, message, and details."],["Each `Status` message includes a status code, a developer-facing error message, and a list of error details carried in messages."],["Developers can learn more about this error model in the API Design Guide, and user-facing messages should be localized."]]],["The `Status` message, used in environments like REST and RPC APIs, defines a logical error model. It conveys errors through three data points: `code` (an integer representing the error type), `message` (a developer-facing English error description), and `details[]` (a list of messages providing further error information). User-facing error messages should be localized and sent in the details field, or localized by the client. This status is used by gRPC.\n"]]