Typ Status definiuje model błędu logicznego, który jest odpowiedni dla różnych środowisk programowania, w tym interfejsów API typu REST i RPC. Jest używany przez 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łędów i o sposobach jego używania znajdziesz w przewodniku API Design Guide (w języku angielskim).
Pola
code
int32
Kod stanu, który powinien być wartością z enumeracji google.rpc.Code.
message
string
Komunikat o błędzie dla programisty, który powinien być w języku angielskim. Wszelkie komunikaty o błędach wyświetlane użytkownikowi powinny być zlokalizowane i wysyłane w polu google.rpc.Status.details lub zlokalizowane przez klienta.
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 2025-08-31 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eStatus\u003c/code\u003e type defines a logical error model suitable for REST APIs and RPC APIs, and is used by gRPC.\u003c/p\u003e\n"],["\u003cp\u003eEach \u003ccode\u003eStatus\u003c/code\u003e message contains an error code, message, and details, providing comprehensive error information.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can access further information about the error model and its usage in the API Design Guide.\u003c/p\u003e\n"]]],["The `Status` message, used in REST and RPC APIs like gRPC, defines a logical error model. It comprises three data points: `code` (an integer representing the error), `message` (a developer-facing English error description), and `details` (a list of messages carrying specific error information). The `details` can contain user-facing localized error messages. The status code is a `google.rpc.Code` enum value.\n"],null,[]]