generated from PenaSide/GolangTemplate
Merge branch 'dev' into 'staging'
feat: log info init topics See merge request pena-services/customer!6
This commit is contained in:
commit
0214b77372
@ -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 <Initialize> of <BrokerService>: %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 <Initialize> of <BrokerService>", topic)
|
||||
lastInitializeErr = fmt.Errorf("failed to create topic <%s> on <Initialize> of <BrokerService>: %w", topic, err)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user