Skip to content

Commit

Permalink
refactor: don't use nil panic
Browse files Browse the repository at this point in the history
  • Loading branch information
BabyHalimao committed Jun 1, 2024
1 parent fda440d commit 2ae3ade
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())
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 2ae3ade

Please sign in to comment.