package errdetails
Import Path
google.golang.org/genproto/googleapis/rpc/errdetails (on go.dev)
Dependency Relation
imports 5 packages, and imported by one package
Involved Source Files
error_details.pb.go
Package-Level Type Names (total 14)
Describes violations in a client request. This error type focuses on the
syntactic aspects of the request.
Describes all violations in a client request.
Deprecated: Use BadRequest.ProtoReflect.Descriptor instead.
(*BadRequest) GetFieldViolations() []*BadRequest_FieldViolation
(*BadRequest) ProtoMessage()
(*BadRequest) ProtoReflect() protoreflect.Message
(*BadRequest) Reset()
(*BadRequest) String() string
*BadRequest : google.golang.org/protobuf/reflect/protoreflect.ProtoMessage
*BadRequest : google.golang.org/protobuf/runtime/protoiface.MessageV1
*BadRequest : expvar.Var
*BadRequest : fmt.Stringer
*BadRequest : github.com/gogo/protobuf/proto.Message
A message type used to describe a single bad request field.
A description of why the request element is bad.
A path that leads to a field in the request body. The value will be a
sequence of dot-separated identifiers that identify a protocol buffer
field.
Consider the following:
message CreateContactRequest {
message EmailAddress {
enum Type {
TYPE_UNSPECIFIED = 0;
HOME = 1;
WORK = 2;
}
optional string email = 1;
repeated EmailType type = 2;
}
string full_name = 1;
repeated EmailAddress email_addresses = 2;
}
In this example, in proto `field` could take one of the following values:
- `full_name` for a violation in the `full_name` value
- `email_addresses[1].email` for a violation in the `email` field of the
first `email_addresses` message
- `email_addresses[3].type[2]` for a violation in the second `type`
value in the third `email_addresses` message.
In JSON, the same values are represented as:
- `fullName` for a violation in the `fullName` value
- `emailAddresses[1].email` for a violation in the `email` field of the
first `emailAddresses` message
- `emailAddresses[3].type[2]` for a violation in the second `type`
value in the third `emailAddresses` message.
Provides a localized error message for field-level errors that is safe to
return to the API consumer.
The reason of the field-level error. This is a constant value that
identifies the proximate cause of the field-level error. It should
uniquely identify the type of the FieldViolation within the scope of the
google.rpc.ErrorInfo.domain. This should be at most 63
characters and match a regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`,
which represents UPPER_SNAKE_CASE.
Deprecated: Use BadRequest_FieldViolation.ProtoReflect.Descriptor instead.
(*BadRequest_FieldViolation) GetDescription() string
(*BadRequest_FieldViolation) GetField() string
(*BadRequest_FieldViolation) GetLocalizedMessage() *LocalizedMessage
(*BadRequest_FieldViolation) GetReason() string
(*BadRequest_FieldViolation) ProtoMessage()
(*BadRequest_FieldViolation) ProtoReflect() protoreflect.Message
(*BadRequest_FieldViolation) Reset()
(*BadRequest_FieldViolation) String() string
*BadRequest_FieldViolation : google.golang.org/protobuf/reflect/protoreflect.ProtoMessage
*BadRequest_FieldViolation : google.golang.org/protobuf/runtime/protoiface.MessageV1
*BadRequest_FieldViolation : expvar.Var
*BadRequest_FieldViolation : fmt.Stringer
*BadRequest_FieldViolation : github.com/gogo/protobuf/proto.Message
func (*BadRequest).GetFieldViolations() []*BadRequest_FieldViolation
Describes additional debugging info.
Additional debugging information provided by the server.
The stack trace entries indicating where the error occurred.
Deprecated: Use DebugInfo.ProtoReflect.Descriptor instead.
(*DebugInfo) GetDetail() string
(*DebugInfo) GetStackEntries() []string
(*DebugInfo) ProtoMessage()
(*DebugInfo) ProtoReflect() protoreflect.Message
(*DebugInfo) Reset()
(*DebugInfo) String() string
*DebugInfo : google.golang.org/protobuf/reflect/protoreflect.ProtoMessage
*DebugInfo : google.golang.org/protobuf/runtime/protoiface.MessageV1
*DebugInfo : expvar.Var
*DebugInfo : fmt.Stringer
*DebugInfo : github.com/gogo/protobuf/proto.Message
Describes the cause of the error with structured details.
Example of an error when contacting the "pubsub.googleapis.com" API when it
is not enabled:
{ "reason": "API_DISABLED"
"domain": "googleapis.com"
"metadata": {
"resource": "projects/123",
"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"
}
}
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".
Additional structured details about this error.
Keys must match a regular expression of `[a-z][a-zA-Z0-9-_]+` but should
ideally be lowerCamelCase. Also, they must be limited to 64 characters in
length. When identifying the current value of an exceeded limit, the units
should be contained in the key, not the value. For example, rather than
`{"instanceLimit": "100/request"}`, should be returned as,
`{"instanceLimitPerRequest": "100"}`, if the client exceeds the number of
instances that can be created in a single (batch) request.
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
domain of errors. This should be at most 63 characters and match a
regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, which represents
UPPER_SNAKE_CASE.
Deprecated: Use ErrorInfo.ProtoReflect.Descriptor instead.
(*ErrorInfo) GetDomain() string
(*ErrorInfo) GetMetadata() map[string]string
(*ErrorInfo) GetReason() string
(*ErrorInfo) ProtoMessage()
(*ErrorInfo) ProtoReflect() protoreflect.Message
(*ErrorInfo) Reset()
(*ErrorInfo) String() string
*ErrorInfo : google.golang.org/protobuf/reflect/protoreflect.ProtoMessage
*ErrorInfo : google.golang.org/protobuf/runtime/protoiface.MessageV1
*ErrorInfo : expvar.Var
*ErrorInfo : fmt.Stringer
*ErrorInfo : github.com/gogo/protobuf/proto.Message
Provides links to documentation or for performing an out of band action.
For example, if a quota check failed with an error indicating the calling
project hasn't enabled the accessed service, this can contain a URL pointing
directly to the right place in the developer console to flip the bit.
URL(s) pointing to additional information on handling the current error.
Deprecated: Use Help.ProtoReflect.Descriptor instead.
(*Help) GetLinks() []*Help_Link
(*Help) ProtoMessage()
(*Help) ProtoReflect() protoreflect.Message
(*Help) Reset()
(*Help) String() string
*Help : google.golang.org/protobuf/reflect/protoreflect.ProtoMessage
*Help : google.golang.org/protobuf/runtime/protoiface.MessageV1
*Help : expvar.Var
*Help : fmt.Stringer
*Help : github.com/gogo/protobuf/proto.Message
Describes a URL link.
Describes what the link offers.
The URL of the link.
Deprecated: Use Help_Link.ProtoReflect.Descriptor instead.
(*Help_Link) GetDescription() string
(*Help_Link) GetUrl() string
(*Help_Link) ProtoMessage()
(*Help_Link) ProtoReflect() protoreflect.Message
(*Help_Link) Reset()
(*Help_Link) String() string
*Help_Link : google.golang.org/protobuf/reflect/protoreflect.ProtoMessage
*Help_Link : google.golang.org/protobuf/runtime/protoiface.MessageV1
*Help_Link : expvar.Var
*Help_Link : fmt.Stringer
*Help_Link : github.com/gogo/protobuf/proto.Message
func (*Help).GetLinks() []*Help_Link
Provides a localized error message that is safe to return to the user
which can be attached to an RPC error.
The locale used following the specification defined at
https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
Examples are: "en-US", "fr-CH", "es-MX"
The localized error message in the above locale.
Deprecated: Use LocalizedMessage.ProtoReflect.Descriptor instead.
(*LocalizedMessage) GetLocale() string
(*LocalizedMessage) GetMessage() string
(*LocalizedMessage) ProtoMessage()
(*LocalizedMessage) ProtoReflect() protoreflect.Message
(*LocalizedMessage) Reset()
(*LocalizedMessage) String() string
*LocalizedMessage : google.golang.org/protobuf/reflect/protoreflect.ProtoMessage
*LocalizedMessage : google.golang.org/protobuf/runtime/protoiface.MessageV1
*LocalizedMessage : expvar.Var
*LocalizedMessage : fmt.Stringer
*LocalizedMessage : github.com/gogo/protobuf/proto.Message
func (*BadRequest_FieldViolation).GetLocalizedMessage() *LocalizedMessage
Describes what preconditions have failed.
For example, if an RPC failed because it required the Terms of Service to be
acknowledged, it could list the terms of service violation in the
PreconditionFailure message.
Describes all precondition violations.
Deprecated: Use PreconditionFailure.ProtoReflect.Descriptor instead.
(*PreconditionFailure) GetViolations() []*PreconditionFailure_Violation
(*PreconditionFailure) ProtoMessage()
(*PreconditionFailure) ProtoReflect() protoreflect.Message
(*PreconditionFailure) Reset()
(*PreconditionFailure) String() string
*PreconditionFailure : google.golang.org/protobuf/reflect/protoreflect.ProtoMessage
*PreconditionFailure : google.golang.org/protobuf/runtime/protoiface.MessageV1
*PreconditionFailure : expvar.Var
*PreconditionFailure : fmt.Stringer
*PreconditionFailure : github.com/gogo/protobuf/proto.Message
A message type used to describe a single precondition failure.
A description of how the precondition failed. Developers can use this
description to understand how to fix the failure.
For example: "Terms of service not accepted".
The subject, relative to the type, that failed.
For example, "google.com/cloud" relative to the "TOS" type would indicate
which terms of service is being referenced.
The type of PreconditionFailure. We recommend using a service-specific
enum type to define the supported precondition violation subjects. For
example, "TOS" for "Terms of Service violation".
Deprecated: Use PreconditionFailure_Violation.ProtoReflect.Descriptor instead.
(*PreconditionFailure_Violation) GetDescription() string
(*PreconditionFailure_Violation) GetSubject() string
(*PreconditionFailure_Violation) GetType() string
(*PreconditionFailure_Violation) ProtoMessage()
(*PreconditionFailure_Violation) ProtoReflect() protoreflect.Message
(*PreconditionFailure_Violation) Reset()
(*PreconditionFailure_Violation) String() string
*PreconditionFailure_Violation : google.golang.org/protobuf/reflect/protoreflect.ProtoMessage
*PreconditionFailure_Violation : google.golang.org/protobuf/runtime/protoiface.MessageV1
*PreconditionFailure_Violation : expvar.Var
*PreconditionFailure_Violation : fmt.Stringer
*PreconditionFailure_Violation : github.com/gogo/protobuf/proto.Message
func (*PreconditionFailure).GetViolations() []*PreconditionFailure_Violation
Describes how a quota check failed.
For example if a daily limit was exceeded for the calling project,
a service could respond with a QuotaFailure detail containing the project
id and the description of the quota limit that was exceeded. If the
calling project hasn't enabled the service in the developer console, then
a service could respond with the project id and set `service_disabled`
to true.
Also see RetryInfo and Help types for other details about handling a
quota failure.
Describes all quota violations.
Deprecated: Use QuotaFailure.ProtoReflect.Descriptor instead.
(*QuotaFailure) GetViolations() []*QuotaFailure_Violation
(*QuotaFailure) ProtoMessage()
(*QuotaFailure) ProtoReflect() protoreflect.Message
(*QuotaFailure) Reset()
(*QuotaFailure) String() string
*QuotaFailure : google.golang.org/protobuf/reflect/protoreflect.ProtoMessage
*QuotaFailure : google.golang.org/protobuf/runtime/protoiface.MessageV1
*QuotaFailure : expvar.Var
*QuotaFailure : fmt.Stringer
*QuotaFailure : github.com/gogo/protobuf/proto.Message
A message type used to describe a single quota violation. For example, a
daily quota or a custom quota that was exceeded.
The API Service from which the `QuotaFailure.Violation` orginates. In
some cases, Quota issues originate from an API Service other than the one
that was called. In other words, a dependency of the called API Service
could be the cause of the `QuotaFailure`, and this field would have the
dependency API service name.
For example, if the called API is Kubernetes Engine API
(container.googleapis.com), and a quota violation occurs in the
Kubernetes Engine API itself, this field would be
"container.googleapis.com". On the other hand, if the quota violation
occurs when the Kubernetes Engine API creates VMs in the Compute Engine
API (compute.googleapis.com), this field would be
"compute.googleapis.com".
A description of how the quota check failed. Clients can use this
description to find more about the quota configuration in the service's
public documentation, or find the relevant quota limit to adjust through
developer console.
For example: "Service disabled" or "Daily Limit for read operations
exceeded".
The new quota value being rolled out at the time of the violation. At the
completion of the rollout, this value will be enforced in place of
quota_value. If no rollout is in progress at the time of the violation,
this field is not set.
For example, if at the time of the violation a rollout is in progress
changing the number of CPUs quota from 10 to 20, 20 would be the value of
this field.
The dimensions of the violated quota. Every non-global quota is enforced
on a set of dimensions. While quota metric defines what to count, the
dimensions specify for what aspects the counter should be increased.
For example, the quota "CPUs per region per VM family" enforces a limit
on the metric "compute.googleapis.com/cpus_per_vm_family" on dimensions
"region" and "vm_family". And if the violation occurred in region
"us-central1" and for VM family "n1", the quota_dimensions would be,
{
"region": "us-central1",
"vm_family": "n1",
}
When a quota is enforced globally, the quota_dimensions would always be
empty.
The id of the violated quota. Also know as "limit name", this is the
unique identifier of a quota in the context of an API service.
For example, "CPUS-PER-VM-FAMILY-per-project-region".
The metric of the violated quota. A quota metric is a named counter to
measure usage, such as API requests or CPUs. When an activity occurs in a
service, such as Virtual Machine allocation, one or more quota metrics
may be affected.
For example, "compute.googleapis.com/cpus_per_vm_family",
"storage.googleapis.com/internet_egress_bandwidth".
The enforced quota value at the time of the `QuotaFailure`.
For example, if the enforced quota value at the time of the
`QuotaFailure` on the number of CPUs is "10", then the value of this
field would reflect this quantity.
The subject on which the quota check failed.
For example, "clientip:<ip address of client>" or "project:<Google
developer project id>".
Deprecated: Use QuotaFailure_Violation.ProtoReflect.Descriptor instead.
(*QuotaFailure_Violation) GetApiService() string
(*QuotaFailure_Violation) GetDescription() string
(*QuotaFailure_Violation) GetFutureQuotaValue() int64
(*QuotaFailure_Violation) GetQuotaDimensions() map[string]string
(*QuotaFailure_Violation) GetQuotaId() string
(*QuotaFailure_Violation) GetQuotaMetric() string
(*QuotaFailure_Violation) GetQuotaValue() int64
(*QuotaFailure_Violation) GetSubject() string
(*QuotaFailure_Violation) ProtoMessage()
(*QuotaFailure_Violation) ProtoReflect() protoreflect.Message
(*QuotaFailure_Violation) Reset()
(*QuotaFailure_Violation) String() string
*QuotaFailure_Violation : google.golang.org/protobuf/reflect/protoreflect.ProtoMessage
*QuotaFailure_Violation : google.golang.org/protobuf/runtime/protoiface.MessageV1
*QuotaFailure_Violation : expvar.Var
*QuotaFailure_Violation : fmt.Stringer
*QuotaFailure_Violation : github.com/gogo/protobuf/proto.Message
func (*QuotaFailure).GetViolations() []*QuotaFailure_Violation
Contains metadata about the request that clients can attach when filing a bug
or providing other forms of feedback.
An opaque string that should only be interpreted by the service generating
it. For example, it can be used to identify requests in the service's logs.
Any data that was used to serve this request. For example, an encrypted
stack trace that can be sent back to the service provider for debugging.
Deprecated: Use RequestInfo.ProtoReflect.Descriptor instead.
(*RequestInfo) GetRequestId() string
(*RequestInfo) GetServingData() string
(*RequestInfo) ProtoMessage()
(*RequestInfo) ProtoReflect() protoreflect.Message
(*RequestInfo) Reset()
(*RequestInfo) String() string
*RequestInfo : google.golang.org/protobuf/reflect/protoreflect.ProtoMessage
*RequestInfo : google.golang.org/protobuf/runtime/protoiface.MessageV1
*RequestInfo : expvar.Var
*RequestInfo : fmt.Stringer
*RequestInfo : github.com/gogo/protobuf/proto.Message
Describes the resource that is being accessed.
Describes what error is encountered when accessing this resource.
For example, updating a cloud project may require the `writer` permission
on the developer console project.
The owner of the resource (optional).
For example, "user:<owner email>" or "project:<Google developer project
id>".
The name of the resource being accessed. For example, a shared calendar
name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
error is
[google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
A name for the type of resource being accessed, e.g. "sql table",
"cloud storage bucket", "file", "Google calendar"; or the type URL
of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
Deprecated: Use ResourceInfo.ProtoReflect.Descriptor instead.
(*ResourceInfo) GetDescription() string
(*ResourceInfo) GetOwner() string
(*ResourceInfo) GetResourceName() string
(*ResourceInfo) GetResourceType() string
(*ResourceInfo) ProtoMessage()
(*ResourceInfo) ProtoReflect() protoreflect.Message
(*ResourceInfo) Reset()
(*ResourceInfo) String() string
*ResourceInfo : google.golang.org/protobuf/reflect/protoreflect.ProtoMessage
*ResourceInfo : google.golang.org/protobuf/runtime/protoiface.MessageV1
*ResourceInfo : expvar.Var
*ResourceInfo : fmt.Stringer
*ResourceInfo : github.com/gogo/protobuf/proto.Message
Describes when the clients can retry a failed request. Clients could ignore
the recommendation here or retry when this information is missing from error
responses.
It's always recommended that clients should use exponential backoff when
retrying.
Clients should wait until `retry_delay` amount of time has passed since
receiving the error response before retrying. If retrying requests also
fail, clients should use an exponential backoff scheme to gradually increase
the delay between retries based on `retry_delay`, until either a maximum
number of retries have been reached or a maximum retry delay cap has been
reached.
Clients should wait at least this long between retrying the same request.
Deprecated: Use RetryInfo.ProtoReflect.Descriptor instead.
(*RetryInfo) GetRetryDelay() *durationpb.Duration
(*RetryInfo) ProtoMessage()
(*RetryInfo) ProtoReflect() protoreflect.Message
(*RetryInfo) Reset()
(*RetryInfo) String() string
*RetryInfo : google.golang.org/protobuf/reflect/protoreflect.ProtoMessage
*RetryInfo : google.golang.org/protobuf/runtime/protoiface.MessageV1
*RetryInfo : expvar.Var
*RetryInfo : fmt.Stringer
*RetryInfo : github.com/gogo/protobuf/proto.Message
Package-Level Variables (only one)
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |