Skip to content

Commit

Permalink
Merge pull request #148 from alenkacz/av/no-logger-fatal
Browse files Browse the repository at this point in the history
do not use logger.Fatal when testing connection
  • Loading branch information
weeco authored May 29, 2022
2 parents 52a26f9 + f848ea9 commit 2f6ccdf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kafka/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (s *Service) CreateAndTestClient(ctx context.Context, l *zap.Logger, opts [
defer cancel()
err = s.testConnection(client, connectCtx)
if err != nil {
logger.Fatal("failed to test connectivity to Kafka cluster", zap.Error(err))
return nil, fmt.Errorf("failed to test connectivity to Kafka cluster %w", err)
}

return client, nil
Expand Down

0 comments on commit 2f6ccdf

Please sign in to comment.