From 597fbb13b7c94f9e4d4466bf574cb9eb3a86c723 Mon Sep 17 00:00:00 2001 From: Zoro <40222601+BabyHalimao@users.noreply.github.com> Date: Mon, 3 Jun 2024 15:51:47 +0800 Subject: [PATCH] refactor(tools/hubl): don't use nil panic (#20515) --- tools/hubl/internal/compat.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/hubl/internal/compat.go b/tools/hubl/internal/compat.go index b67e7adfd8..736ff1f141 100644 --- a/tools/hubl/internal/compat.go +++ b/tools/hubl/internal/compat.go @@ -59,7 +59,7 @@ func loadFileDescriptorsGRPCReflection(ctx context.Context, client *grpc.ClientC switch res := in.MessageResponse.(type) { case *grpc_reflection_v1alpha.ServerReflectionResponse_ErrorResponse: - panic(err) + panic(res.ErrorResponse.String()) //nolint:staticcheck // we want to use the deprecated field case *grpc_reflection_v1alpha.ServerReflectionResponse_ListServicesResponse: waitListServiceRes <- res.ListServicesResponse //nolint:staticcheck // we want to use the deprecated field case *grpc_reflection_v1alpha.ServerReflectionResponse_FileDescriptorResponse: