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.
JSON representation | |
---|---|
{
"violations": [
{
object( |
Fields | |
---|---|
violations[] |
Describes all precondition violations. |
Violation
A message type used to describe a single precondition failure.
JSON representation | |
---|---|
{ "type": string, "subject": string, "description": string } |
Fields | |
---|---|
type |
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". |
subject |
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. |
description |
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". |