diff --git a/pkg/kafka/kafka.go b/pkg/kafka/kafka.go index a95d32f..94e9555 100644 --- a/pkg/kafka/kafka.go +++ b/pkg/kafka/kafka.go @@ -66,7 +66,7 @@ func Initialize(ctx context.Context, brokers, topics []string) error { for _, topic := range topics { isExist, err := kafka.TopicExists(ctx, topic) if err != nil { - lastInitializeErr = err + lastInitializeErr = fmt.Errorf("failed to check is topic <%s> exist on of : %w", topic, err) continue } @@ -75,7 +75,7 @@ func Initialize(ctx context.Context, brokers, topics []string) error { } if err := kafka.CreateTopic(ctx, topic); err != nil { - lastInitializeErr = fmt.Errorf("failed to create topic <%s> on of ", topic) + lastInitializeErr = fmt.Errorf("failed to create topic <%s> on of : %w", topic, err) } }