diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc index 1b48d6a4d37..ecd80ac16e8 100644 --- a/src/core/ext/filters/client_channel/client_channel.cc +++ b/src/core/ext/filters/client_channel/client_channel.cc @@ -28,6 +28,7 @@ #include +#include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" #include @@ -1683,8 +1684,9 @@ ChannelData::ChannelData(grpc_channel_element_args* args, grpc_error** error) ? new_args : grpc_channel_args_copy(args->channel_args); if (!ResolverRegistry::IsValidTarget(target_uri_.get())) { - *error = - GRPC_ERROR_CREATE_FROM_STATIC_STRING("the target uri is not valid."); + std::string error_message = + absl::StrCat("the target uri is not valid: ", target_uri_.get()); + *error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(error_message.c_str()); return; } *error = GRPC_ERROR_NONE;