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".
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[[["\u003cp\u003eErrorInfo is a class that provides structured details about the cause of an error, including a reason, domain, and metadata.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eDomain\u003c/code\u003e property specifies the logical grouping of the error, typically the service name that generated it, like "pubsub.googleapis.com" or "googleapis.com" for Google API infrastructure errors.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eReason\u003c/code\u003e property offers a constant, unique identifier for the error's proximate cause, represented in UPPER_SNAKE_CASE, and it must be at most 63 characters long.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eMetadata\u003c/code\u003e property allows for additional structured details about the error, using key-value pairs where keys should be limited to 64 characters and use the format \u003ccode\u003e[a-zA-Z0-9-_]\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eErrorInfo includes methods for deep cloning (\u003ccode\u003eClone()\u003c/code\u003e), calculating size (\u003ccode\u003eCalculateSize()\u003c/code\u003e), and merging data from other messages (\u003ccode\u003eMergeFrom()\u003c/code\u003e).\u003c/p\u003e\n"]]],[],null,["# Class ErrorInfo (2.17.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.17.0 (latest)](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.ErrorInfo)\n- [2.15.0](/dotnet/docs/reference/Google.Api.CommonProtos/2.15.0/Google.Rpc.ErrorInfo)\n- [2.10.0](/dotnet/docs/reference/Google.Api.CommonProtos/2.10.0/Google.Rpc.ErrorInfo)\n- [2.2.0](/dotnet/docs/reference/Google.Api.CommonProtos/2.2.0/Google.Rpc.ErrorInfo) \n\n public sealed class ErrorInfo : IMessage\u003cErrorInfo\u003e, IEquatable\u003cErrorInfo\u003e, IDeepCloneable\u003cErrorInfo\u003e, IBufferMessage, IMessage\n\nDescribes the cause of the error with structured details.\n\nExample of an error when contacting the \"pubsub.googleapis.com\" API when it\nis not enabled: \n\n { \"reason\": \"API_DISABLED\"\n \"domain\": \"googleapis.com\"\n \"metadata\": {\n \"resource\": \"projects/123\",\n \"service\": \"pubsub.googleapis.com\"\n }\n }\n\nThis response indicates that the pubsub.googleapis.com API is not enabled.\n\nExample of an error that is returned when attempting to create a Spanner\ninstance in a region that is out of stock: \n\n { \"reason\": \"STOCKOUT\"\n \"domain\": \"spanner.googleapis.com\",\n \"metadata\": {\n \"availableRegions\": \"us-central1,us-east2\"\n }\n }\n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e ErrorInfo \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[ErrorInfo](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.ErrorInfo), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[ErrorInfo](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.ErrorInfo), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[ErrorInfo](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.ErrorInfo), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals)\n\nNamespace\n---------\n\n[Google.Rpc](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc)\n\nAssembly\n--------\n\nGoogle.Api.CommonProtos.dll\n\nConstructors\n------------\n\n### ErrorInfo()\n\n public ErrorInfo()\n\n### ErrorInfo(ErrorInfo)\n\n public ErrorInfo(ErrorInfo other)\n\nFields\n------\n\n### DomainFieldNumber\n\n public const int DomainFieldNumber = 2\n\nField number for the \"domain\" field.\n\n### MetadataFieldNumber\n\n public const int MetadataFieldNumber = 3\n\nField number for the \"metadata\" field.\n\n### ReasonFieldNumber\n\n public const int ReasonFieldNumber = 1\n\nField number for the \"reason\" field.\n\nProperties\n----------\n\n### Descriptor\n\n public static MessageDescriptor Descriptor { get; }\n\n### Domain\n\n public string Domain { get; set; }\n\nThe logical grouping to which the \"reason\" belongs. The error domain\nis typically the registered service name of the tool or product that\ngenerates the error. Example: \"pubsub.googleapis.com\". If the error is\ngenerated by some common infrastructure, the error domain must be a\nglobally unique value that identifies the infrastructure. For Google API\ninfrastructure, the error domain is \"googleapis.com\".\n\n### Metadata\n\n public MapField\u003cstring, string\u003e Metadata { get; }\n\nAdditional structured details about this error.\n\nKeys must match a regular expression of `[a-z][a-zA-Z0-9-_]+` but should\nideally be lowerCamelCase. Also, they must be limited to 64 characters in\nlength. When identifying the current value of an exceeded limit, the units\nshould be contained in the key, not the value. For example, rather than\n`{\"instanceLimit\": \"100/request\"}`, should be returned as,\n`{\"instanceLimitPerRequest\": \"100\"}`, if the client exceeds the number of\ninstances that can be created in a single (batch) request.\n\n### Parser\n\n public static MessageParser\u003cErrorInfo\u003e Parser { get; }\n\n### Reason\n\n public string Reason { get; set; }\n\nThe reason of the error. This is a constant value that identifies the\nproximate cause of the error. Error reasons are unique within a particular\ndomain of errors. This should be at most 63 characters and match a\nregular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, which represents\nUPPER_SNAKE_CASE.\n\nMethods\n-------\n\n### CalculateSize()\n\n public int CalculateSize()\n\n### Clone()\n\n public ErrorInfo Clone()\n\n### Equals(ErrorInfo)\n\n public bool Equals(ErrorInfo other)\n\n### Equals(object)\n\n public override bool Equals(object other)\n\n**Overrides** \n[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object))\n\n### GetHashCode()\n\n public override int GetHashCode()\n\n**Overrides** \n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode)\n\n### MergeFrom(CodedInputStream)\n\n public void MergeFrom(CodedInputStream input)\n\n### MergeFrom(ErrorInfo)\n\n public void MergeFrom(ErrorInfo other)\n\n### ToString()\n\n public override string ToString()\n\n**Overrides** \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\n### WriteTo(CodedOutputStream)\n\n public void WriteTo(CodedOutputStream output)"]]