diff --git a/extkafka/partition_attack_elect_new_leader.go b/extkafka/partition_attack_elect_new_leader.go index e3d5602..0c4f567 100644 --- a/extkafka/partition_attack_elect_new_leader.go +++ b/extkafka/partition_attack_elect_new_leader.go @@ -132,7 +132,7 @@ func (f kafkaBrokerElectNewLeaderAttack) Start(ctx context.Context, state *Kafka Level: extutil.Ptr(action_kit_api.Warn), Message: fmt.Sprintf("Error while electing leader for topic '%s', partition %d, error is: %s", t, partition, result.Err.Error()), }) - errs = append(errs, errors.New(fmt.Sprintf("Error while electing leader for topic '%s', partition %d, error is: %s", t, partition, result.Err.Error()))) + errs = append(errs, fmt.Errorf("error while electing leader for topic '%s', partition %d, error is: %s", t, partition, result.Err.Error())) } else { messages = append(messages, action_kit_api.Message{ Level: extutil.Ptr(action_kit_api.Info),