Update the comments for ErrorInfo and introduce 'extensions' field in attribute_context.

PiperOrigin-RevId: 321098618
This commit is contained in:
Google APIs 2020-07-13 22:27:46 -07:00 committed by Copybara-Service
parent 59f97e6044
commit 3474dc8923
3 changed files with 18 additions and 9 deletions

View File

@ -14,6 +14,7 @@ proto_library(
"attribute_context.proto",
],
deps = [
"@com_google_protobuf//:any_proto",
"@com_google_protobuf//:struct_proto",
"@com_google_protobuf//:timestamp_proto",
],
@ -63,6 +64,7 @@ moved_proto_library(
name = "attribute_context_moved_proto",
srcs = [":attribute_context_proto"],
deps = [
"@com_google_protobuf//:any_proto",
"@com_google_protobuf//:struct_proto",
"@com_google_protobuf//:timestamp_proto",
],

View File

@ -16,6 +16,7 @@ syntax = "proto3";
package google.rpc.context;
import "google/protobuf/any.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
@ -107,10 +108,10 @@ message AttributeContext {
// value(s) depends on the `issuer`, but typically include one or more of
// the following pieces of information:
//
// * The services intended to receive the credential such as
// ["pubsub.googleapis.com", "storage.googleapis.com"]
// * The services intended to receive the credential. For example,
// ["https://pubsub.googleapis.com/", "https://storage.googleapis.com/"].
// * A set of service-based scopes. For example,
// ["https://www.googleapis.com/auth/cloud-platform"]
// ["https://www.googleapis.com/auth/cloud-platform"].
// * The client id of an app, such as the Firebase project id for JWTs
// from Firebase Auth.
//
@ -284,4 +285,7 @@ message AttributeContext {
// Represents an API operation that is involved to a network activity.
Api api = 6;
// Supports extensions for advanced use cases, such as logs and metrics.
repeated google.protobuf.Any extensions = 8;
}

View File

@ -89,6 +89,7 @@ message QuotaFailure {
//
// Example of an error when contacting the "pubsub.googleapis.com" API when it
// is not enabled:
//
// { "reason": "API_DISABLED"
// "domain": "googleapis.com"
// "metadata": {
@ -96,17 +97,18 @@ message QuotaFailure {
// "service": "pubsub.googleapis.com"
// }
// }
//
// This response indicates that the pubsub.googleapis.com API is not enabled.
//
// Example of an error that is returned when attempting to create a Spanner
// instance in a region that is out of stock:
//
// { "reason": "STOCKOUT"
// "domain": "spanner.googleapis.com",
// "metadata": {
// "availableRegions": "us-central1,us-east2"
// }
// }
//
message ErrorInfo {
// The reason of the error. This is a constant value that identifies the
// proximate cause of the error. Error reasons are unique within a particular
@ -114,11 +116,12 @@ message ErrorInfo {
// /[A-Z0-9_]+/.
string reason = 1;
// The logical grouping to which the "reason" belongs. Often "domain" will
// contain the registered service name of the tool or product that is the
// source of the error. Example: "pubsub.googleapis.com". If the error is
// common across many APIs, the first segment of the example above will be
// omitted. The value will be, "googleapis.com".
// The logical grouping to which the "reason" belongs. The error domain
// is typically the registered service name of the tool or product that
// generates the error. Example: "pubsub.googleapis.com". If the error is
// generated by some common infrastructure, the error domain must be a
// globally unique value that identifies the infrastructure. For Google API
// infrastructure, the error domain is "googleapis.com".
string domain = 2;
// Additional structured details about this error.