| 1 |
// Copyright 2026 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 go_package = "google.golang.org/genproto/googleapis/rpc/status;status"; |
| 22 |
option java_multiple_files = true; |
| 23 |
option java_outer_classname = "StatusProto"; |
| 24 |
option java_package = "com.google.rpc"; |
| 25 |
option objc_class_prefix = "RPC"; |
| 26 |
|
| 27 |
// The `Status` type defines a logical error model that is suitable for |
| 28 |
// different programming environments, including REST APIs and RPC APIs. It is |
| 29 |
// used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 30 |
// three pieces of data: error code, error message, and error details. |
| 31 |
// |
| 32 |
// You can find out more about this error model and how to work with it in the |
| 33 |
// [API Design Guide](https://cloud.google.com/apis/design/errors). |
| 34 |
message Status { |
| 35 |
// The status code, which should be an enum value of |
| 36 |
// [google.rpc.Code][google.rpc.Code]. |
| 37 |
int32 code = 1; |
| 38 |
|
| 39 |
// A developer-facing error message, which should be in English. Any |
| 40 |
// user-facing error message should be localized and sent in the |
| 41 |
// [google.rpc.Status.details][google.rpc.Status.details] field, or localized |
| 42 |
// by the client. |
| 43 |
string message = 2; |
| 44 |
|
| 45 |
// A list of messages that carry the error details. There is a common set of |
| 46 |
// message types for APIs to use. |
| 47 |
repeated google.protobuf.Any details = 3; |
| 48 |
} |