aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/grpc/src/cpp/util/error_details.cc
diff options
context:
space:
mode:
authorarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-03-15 21:33:41 +0300
committerarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-03-15 21:33:41 +0300
commit3dd665b514943f69657b593eb51af90b99b1206b (patch)
tree0eb633e628bb1fe6c639574b1184d43def7c0a73 /contrib/libs/grpc/src/cpp/util/error_details.cc
parenta68afc731202027f105bc5723ee11788017c29e2 (diff)
downloadydb-3dd665b514943f69657b593eb51af90b99b1206b.tar.gz
intermediate changes
ref:953ca886ec160075b38c0f3614de029b423f0a9e
Diffstat (limited to 'contrib/libs/grpc/src/cpp/util/error_details.cc')
-rw-r--r--contrib/libs/grpc/src/cpp/util/error_details.cc31
1 files changed, 0 insertions, 31 deletions
diff --git a/contrib/libs/grpc/src/cpp/util/error_details.cc b/contrib/libs/grpc/src/cpp/util/error_details.cc
index dfd3351be1..0330f012c2 100644
--- a/contrib/libs/grpc/src/cpp/util/error_details.cc
+++ b/contrib/libs/grpc/src/cpp/util/error_details.cc
@@ -17,34 +17,3 @@
*/
#include <grpcpp/support/error_details.h>
-
-#include "src/proto/grpc/status/status.pb.h"
-
-namespace grpc {
-
-grpc::Status ExtractErrorDetails(const grpc::Status& from,
- ::google::rpc::Status* to) {
- if (to == nullptr) {
- return grpc::Status(grpc::StatusCode::FAILED_PRECONDITION, "");
- }
- if (!to->ParseFromString(TProtoStringType(from.error_details()))) {
- return grpc::Status(grpc::StatusCode::INVALID_ARGUMENT, "");
- }
- return grpc::Status::OK;
-}
-
-grpc::Status SetErrorDetails(const ::google::rpc::Status& from,
- grpc::Status* to) {
- if (to == nullptr) {
- return grpc::Status(grpc::StatusCode::FAILED_PRECONDITION, "");
- }
- grpc::StatusCode code = grpc::StatusCode::UNKNOWN;
- if (from.code() >= grpc::StatusCode::OK &&
- from.code() <= grpc::StatusCode::UNAUTHENTICATED) {
- code = static_cast<grpc::StatusCode>(from.code());
- }
- *to = grpc::Status(code, from.message(), from.SerializeAsString());
- return grpc::Status::OK;
-}
-
-} // namespace grpc