aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar yihuaz <yihuaz@google.com>2018-08-06 09:27:03 -0700
committerGravatar GitHub <noreply@github.com>2018-08-06 09:27:03 -0700
commit26762216bc26cb23921699bf86fd859289f70819 (patch)
tree5f0ace59b22b35c7fe1124304c3ffcc391a01eff /src
parentdb81537c0b8b800e334cd5f1412957f192198dfe (diff)
parent072c0f69480448cb1b343f51977ceff2f2bed172 (diff)
Merge pull request #16200 from yihuazhang/alts_print_nanny_error_messages
Log error messages returned from ALTS handshaker service
Diffstat (limited to 'src')
-rw-r--r--src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc b/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc
index 06b999899a..1df1021bb1 100644
--- a/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc
+++ b/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc
@@ -462,6 +462,14 @@ void alts_tsi_handshaker_handle_response(alts_tsi_handshaker* handshaker,
set_unused_bytes(result, &handshaker->recv_bytes, resp->bytes_consumed);
}
grpc_status_code code = static_cast<grpc_status_code>(resp->status.code);
+ if (code != GRPC_STATUS_OK) {
+ grpc_slice* details = static_cast<grpc_slice*>(resp->status.details.arg);
+ if (details != nullptr) {
+ char* error_details = grpc_slice_to_c_string(*details);
+ gpr_log(GPR_ERROR, "Error from handshaker service:%s", error_details);
+ gpr_free(error_details);
+ }
+ }
grpc_gcp_handshaker_resp_destroy(resp);
cb(alts_tsi_utils_convert_to_tsi_result(code), user_data, bytes_to_send,
bytes_to_send_size, result);