|
| 1 | +// Copyright 2025 Google LLC |
| 2 | +// |
| 3 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +// you may not use this file except in compliance with the License. |
| 5 | +// You may obtain a copy of the License at |
| 6 | +// |
| 7 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 9 | +// Unless required by applicable law or agreed to in writing, software |
| 10 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +// See the License for the specific language governing permissions and |
| 13 | +// limitations under the License. |
| 14 | + |
| 15 | +syntax = "proto3"; |
| 16 | + |
| 17 | +package google.rpc; |
| 18 | + |
| 19 | +import "google/protobuf/any.proto"; |
| 20 | + |
| 21 | +option cc_enable_arenas = true; |
| 22 | +option go_package = "google.golang.org/genproto/googleapis/rpc/status;status"; |
| 23 | +option java_multiple_files = true; |
| 24 | +option java_outer_classname = "StatusProto"; |
| 25 | +option java_package = "com.google.rpc"; |
| 26 | +option objc_class_prefix = "RPC"; |
| 27 | + |
| 28 | +// The `Status` type defines a logical error model that is suitable for |
| 29 | +// different programming environments, including REST APIs and RPC APIs. It is |
| 30 | +// used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 31 | +// three pieces of data: error code, error message, and error details. |
| 32 | +// |
| 33 | +// You can find out more about this error model and how to work with it in the |
| 34 | +// [API Design Guide](https://cloud.google.com/apis/design/errors). |
| 35 | +message Status { |
| 36 | + // The status code, which should be an enum value of |
| 37 | + // [google.rpc.Code][google.rpc.Code]. |
| 38 | + int32 code = 1; |
| 39 | + |
| 40 | + // A developer-facing error message, which should be in English. Any |
| 41 | + // user-facing error message should be localized and sent in the |
| 42 | + // [google.rpc.Status.details][google.rpc.Status.details] field, or localized |
| 43 | + // by the client. |
| 44 | + string message = 2; |
| 45 | + |
| 46 | + // A list of messages that carry the error details. There is a common set of |
| 47 | + // message types for APIs to use. |
| 48 | + repeated google.protobuf.Any details = 3; |
| 49 | +} |
0 commit comments