Skip to content

Commit

Permalink
refactor(tools/hubl): don't use nil panic (#20515)
Browse files Browse the repository at this point in the history
  • Loading branch information
BabyHalimao authored Jun 3, 2024
1 parent 0f81966 commit 597fbb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/hubl/internal/compat.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 597fbb1

Please sign in to comment.