Remove non-logging usages Status::ToString and hence the string representation of error codes
PiperOrigin-RevId: 390508453
Change-Id: Ic53772731da5e3c0ba6d1f9469d039aee4bdd941
diff --git a/tensorflow/core/distributed_runtime/graph_mgr.cc b/tensorflow/core/distributed_runtime/graph_mgr.cc
index 889bf4e..b0b3d39 100644
--- a/tensorflow/core/distributed_runtime/graph_mgr.cc
+++ b/tensorflow/core/distributed_runtime/graph_mgr.cc
@@ -376,7 +376,7 @@
// Failing to fetch the outputs should not be possible, so rewrite the error
// status to an INTERNAL error.
s = errors::Internal("Failed to fetch outputs for step ", step_id,
- ". (Original error message: ", s.ToString(), ")");
+ ". (Original error message: ", s.error_message(), ")");
}
size_t output_size = 0;
for (auto& p : *out) {
diff --git a/tensorflow/core/distributed_runtime/rpc/grpc_worker_service_impl.h b/tensorflow/core/distributed_runtime/rpc/grpc_worker_service_impl.h
index 00434b3..68fbe3a 100644
--- a/tensorflow/core/distributed_runtime/rpc/grpc_worker_service_impl.h
+++ b/tensorflow/core/distributed_runtime/rpc/grpc_worker_service_impl.h
@@ -56,7 +56,7 @@
if (!s.ok()) {
result = Status(StatusCode::INTERNAL,
::tensorflow::strings::StrCat(
- "TensorResponse parse error", s.ToString()));
+ "TensorResponse parse error", s.error_message()));
}
}
buffer->Clear();