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.
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.
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 setservice_disabledto true.
Also see RetryInfo and Help types for other details about handling a
quota failure.
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 untilretry_delayamount 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 onretry_delay, until either a maximum
number of retries have been reached or a maximum retry delay cap has been
reached.
TheStatustype defines a logical error model that is suitable for
different programming environments, including REST APIs and RPC APIs. It is
used bygRPC. EachStatusmessage contains
three pieces of data: error code, error message, and error details.
You can find out more about this error model and how to work with it in theAPI Design Guide.
Sometimes multiple error codes may apply. Services should return
the most specific error code that applies. For example, preferOUT_OF_RANGEoverFAILED_PRECONDITIONif both codes apply.
Similarly preferNOT_FOUNDorALREADY_EXISTSoverFAILED_PRECONDITION.
[[["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-09-04 UTC."],[[["\u003cp\u003eThis documentation covers the \u003ccode\u003eGoogle.Rpc\u003c/code\u003e namespace, which includes classes, enums, and other components for handling errors and status information in gRPC APIs and REST APIs.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eStatus\u003c/code\u003e class is a key component, defining a logical error model with error codes, messages, and details, consistent with the API Design Guide and used by gRPC.\u003c/p\u003e\n"],["\u003cp\u003eSeveral classes are detailed, such as \u003ccode\u003eBadRequest\u003c/code\u003e, \u003ccode\u003eErrorInfo\u003c/code\u003e, \u003ccode\u003eHelp\u003c/code\u003e, \u003ccode\u003ePreconditionFailure\u003c/code\u003e, and \u003ccode\u003eQuotaFailure\u003c/code\u003e, each serving to provide specific error context and details, often used to describe violations, failures, or preconditions.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCode\u003c/code\u003e enum provides canonical error codes for gRPC APIs, helping services return specific error conditions like \u003ccode\u003eOUT_OF_RANGE\u003c/code\u003e, \u003ccode\u003eNOT_FOUND\u003c/code\u003e, or \u003ccode\u003eALREADY_EXISTS\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe documentation also includes classes like \u003ccode\u003eRetryInfo\u003c/code\u003e, \u003ccode\u003eRequestInfo\u003c/code\u003e, and \u003ccode\u003eResourceInfo\u003c/code\u003e, offering additional mechanisms for clients to handle errors, track requests, and understand resource context within the error model.\u003c/p\u003e\n"]]],[],null,["# Namespace Google.Rpc (2.17.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.17.0 (latest)](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc)\n- [2.15.0](/dotnet/docs/reference/Google.Api.CommonProtos/2.15.0/Google.Rpc)\n- [2.10.0](/dotnet/docs/reference/Google.Api.CommonProtos/2.10.0/Google.Rpc)\n- [2.2.0](/dotnet/docs/reference/Google.Api.CommonProtos/2.2.0/Google.Rpc) \n\nClasses\n-------\n\n### [BadRequest](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.BadRequest)\n\nDescribes violations in a client request. This error type focuses on the\nsyntactic aspects of the request.\n\n### [BadRequest.Types](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.BadRequest.Types)\n\nContainer for nested types declared in the BadRequest message type.\n\n### [BadRequest.Types.FieldViolation](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.BadRequest.Types.FieldViolation)\n\nA message type used to describe a single bad request field.\n\n### [CodeReflection](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.CodeReflection)\n\nHolder for reflection information generated from google/rpc/code.proto\n\n### [DebugInfo](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.DebugInfo)\n\nDescribes additional debugging info.\n\n### [ErrorDetailsReflection](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.ErrorDetailsReflection)\n\nHolder for reflection information generated from google/rpc/error_details.proto\n\n### [ErrorInfo](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.ErrorInfo)\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\n### [Help](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.Help)\n\nProvides links to documentation or for performing an out of band action.\n\nFor example, if a quota check failed with an error indicating the calling\nproject hasn't enabled the accessed service, this can contain a URL pointing\ndirectly to the right place in the developer console to flip the bit.\n\n### [Help.Types](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.Help.Types)\n\nContainer for nested types declared in the Help message type.\n\n### [Help.Types.Link](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.Help.Types.Link)\n\nDescribes a URL link.\n\n### [HttpHeader](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.HttpHeader)\n\nRepresents an HTTP header.\n\n### [HttpReflection](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.HttpReflection)\n\nHolder for reflection information generated from google/rpc/http.proto\n\n### [HttpRequest](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.HttpRequest)\n\nRepresents an HTTP request.\n\n### [HttpResponse](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.HttpResponse)\n\nRepresents an HTTP response.\n\n### [LocalizedMessage](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.LocalizedMessage)\n\nProvides a localized error message that is safe to return to the user\nwhich can be attached to an RPC error.\n\n### [PreconditionFailure](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.PreconditionFailure)\n\nDescribes what preconditions have failed.\n\nFor example, if an RPC failed because it required the Terms of Service to be\nacknowledged, it could list the terms of service violation in the\nPreconditionFailure message.\n\n### [PreconditionFailure.Types](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.PreconditionFailure.Types)\n\nContainer for nested types declared in the PreconditionFailure message type.\n\n### [PreconditionFailure.Types.Violation](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.PreconditionFailure.Types.Violation)\n\nA message type used to describe a single precondition failure.\n\n### [QuotaFailure](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.QuotaFailure)\n\nDescribes how a quota check failed.\n\nFor example if a daily limit was exceeded for the calling project,\na service could respond with a QuotaFailure detail containing the project\nid and the description of the quota limit that was exceeded. If the\ncalling project hasn't enabled the service in the developer console, then\na service could respond with the project id and set `service_disabled`\nto true.\n\nAlso see RetryInfo and Help types for other details about handling a\nquota failure.\n\n### [QuotaFailure.Types](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.QuotaFailure.Types)\n\nContainer for nested types declared in the QuotaFailure message type.\n\n### [QuotaFailure.Types.Violation](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.QuotaFailure.Types.Violation)\n\nA message type used to describe a single quota violation. For example, a\ndaily quota or a custom quota that was exceeded.\n\n### [RequestInfo](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.RequestInfo)\n\nContains metadata about the request that clients can attach when filing a bug\nor providing other forms of feedback.\n\n### [ResourceInfo](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.ResourceInfo)\n\nDescribes the resource that is being accessed.\n\n### [RetryInfo](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.RetryInfo)\n\nDescribes when the clients can retry a failed request. Clients could ignore\nthe recommendation here or retry when this information is missing from error\nresponses.\n\nIt's always recommended that clients should use exponential backoff when\nretrying.\n\nClients should wait until `retry_delay` amount of time has passed since\nreceiving the error response before retrying. If retrying requests also\nfail, clients should use an exponential backoff scheme to gradually increase\nthe delay between retries based on `retry_delay`, until either a maximum\nnumber of retries have been reached or a maximum retry delay cap has been\nreached.\n\n### [StandardErrorTypeRegistry](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.StandardErrorTypeRegistry)\n\nRegistry of the [standard set of error types](https://github.com/googleapis/googleapis/blob/master/google/rpc/error_details.proto) defined in the richer error model developed and used by Google.\nThese can be sepcified in the [Details](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.Status#Google_Rpc_Status_Details).\n\n### [Status](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.Status)\n\nThe `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). Each `Status` message contains\nthree pieces of data: error code, error message, and error details.\n\nYou can find out more about this error model and how to work with it in the\n[API Design Guide](https://cloud.google.com/apis/design/errors).\n\n### [StatusReflection](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.StatusReflection)\n\nHolder for reflection information generated from google/rpc/status.proto\n\nEnums\n-----\n\n### [Code](/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Rpc.Code)\n\nThe canonical error codes for gRPC APIs.\n\nSometimes multiple error codes may apply. Services should return\nthe most specific error code that applies. For example, prefer\n`OUT_OF_RANGE` over `FAILED_PRECONDITION` if both codes apply.\nSimilarly prefer `NOT_FOUND` or `ALREADY_EXISTS` over `FAILED_PRECONDITION`."]]