#include <userver/ugrpc/rich_status.hpp>
Provides a localized error message that is safe to return to the user.
Provides a localized error message that is safe to return to the user which can be attached to an RPC error.
The LocalizedMessage payload should contain the complete resolution to the error. If more information is needed than can reasonably fit in this payload, then additional resolution information must be provided in a Help payload.
Definition at line 357 of file rich_status.hpp.
Public Member Functions | |
| google::rpc::LocalizedMessage | ToGoogleErrorDetail () const & |
| google::rpc::LocalizedMessage | ToGoogleErrorDetail () && |
Static Public Member Functions | |
| static std::optional< LocalizedMessage > | TryUnpack (const google::protobuf::Any &any) |
Public Attributes | |
| std::string | locale |
| The locale (e.g., "en-US", "ru-RU", "ja-JP"). | |
| std::string | message |
| The localized error message. | |
| std::string ugrpc::LocalizedMessage::locale |
The locale (e.g., "en-US", "ru-RU", "ja-JP").
Definition at line 359 of file rich_status.hpp.
| std::string ugrpc::LocalizedMessage::message |
The localized error message.
This should include a brief description of the error and a call to action to resolve the error. The message should include contextual information to make the message as specific as possible. Any contextual information in the message must be included in ErrorInfo::metadata.
Definition at line 366 of file rich_status.hpp.