#include <userver/ugrpc/rich_status.hpp>
Describes a single precondition violation.
Definition at line 192 of file rich_status.hpp.
Public Attributes | |
| std::string | type |
| The type of precondition that failed (e.g., "TOS", "AGE"). | |
| std::string | subject |
| The subject on which the precondition failed (e.g., "user:123"). | |
| std::string | description |
| A description of how the precondition failed. | |
| std::string ugrpc::PreconditionViolation::description |
A description of how the precondition failed.
Developers can use this description to understand how to fix the failure. For Example usage: "Terms of service not accepted".
Definition at line 209 of file rich_status.hpp.
| std::string ugrpc::PreconditionViolation::subject |
The subject on which the precondition failed (e.g., "user:123").
For example, "google.com/cloud" relative to the "TOS" type would indicate which terms of service is being referenced.
Definition at line 203 of file rich_status.hpp.
| std::string ugrpc::PreconditionViolation::type |
The type of precondition that failed (e.g., "TOS", "AGE").
Google recommends using a service-specific enum type to define the supported precondition violation subjects. For example, "TOS" for "Terms of Service violation".
Definition at line 197 of file rich_status.hpp.