ErrorInfo

com.google.rpc.error_details.ErrorInfo
See theErrorInfo companion object
final case class ErrorInfo(reason: String, domain: String, metadata: Map[String, String], unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[ErrorInfo]

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" } }

Value parameters

domain

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".

metadata

Additional structured details about this error. Keys should match /[a-zA-Z0-9-_]/ and 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.

reason

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.

Attributes

Companion
object
Source
ErrorInfo.scala
Graph
Supertypes
trait Updatable[ErrorInfo]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def addAllMetadata(`__vs`: Iterable[(String, String)]): ErrorInfo

Attributes

Source
ErrorInfo.scala
def addMetadata(`__vs`: (String, String)*): ErrorInfo

Attributes

Source
ErrorInfo.scala

Attributes

Source
ErrorInfo.scala
def companion: ErrorInfo.type

Attributes

Source
ErrorInfo.scala
def getField(`__field`: FieldDescriptor): PValue

Attributes

Source
ErrorInfo.scala
def getFieldByNumber(`__fieldNumber`: Int): Any

Attributes

Source
ErrorInfo.scala
override def serializedSize: Int

Attributes

Definition Classes
GeneratedMessage
Source
ErrorInfo.scala
def toProtoString: String

Returns a human-readable ASCII format representation of this message.

Returns a human-readable ASCII format representation of this message.

The original message can be decoded from this format by using fromAscii on the companion object.

Attributes

Returns

human-readable representation of this message.

Source
ErrorInfo.scala
def withDomain(`__v`: String): ErrorInfo

Attributes

Source
ErrorInfo.scala
def withMetadata(`__v`: Map[String, String]): ErrorInfo

Attributes

Source
ErrorInfo.scala
def withReason(`__v`: String): ErrorInfo

Attributes

Source
ErrorInfo.scala
def withUnknownFields(`__v`: UnknownFieldSet): ErrorInfo

Attributes

Source
ErrorInfo.scala
def writeTo(`_output__`: CodedOutputStream): Unit

Serializes the message into the given coded output stream

Serializes the message into the given coded output stream

Attributes

Source
ErrorInfo.scala

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
final def toByteArray: Array[Byte]

Serializes the message and returns a byte array containing its raw bytes

Serializes the message and returns a byte array containing its raw bytes

Attributes

Inherited from:
GeneratedMessage
Source
GeneratedMessageCompanion.scala
final def toByteString: ByteString

Serializes the message and returns a ByteString containing its raw bytes

Serializes the message and returns a ByteString containing its raw bytes

Attributes

Inherited from:
GeneratedMessage
Source
GeneratedMessageCompanion.scala
final def toPMessage: PMessage

Attributes

Inherited from:
GeneratedMessage
Source
GeneratedMessageCompanion.scala
def update(ms: Lens[ErrorInfo, ErrorInfo] => () => ErrorInfo*): A

Attributes

Inherited from:
Updatable
Source
Lenses.scala
final def writeDelimitedTo(output: OutputStream): Unit

Attributes

Inherited from:
GeneratedMessage
Source
GeneratedMessageCompanion.scala
final def writeTo(output: OutputStream): Unit

Serializes the message into the given output stream

Serializes the message into the given output stream

Attributes

Inherited from:
GeneratedMessage
Source
GeneratedMessageCompanion.scala