From 368c6699e19e1a2b7a4cef91e120789611bc1d76 Mon Sep 17 00:00:00 2001 From: "antoine.choimet" Date: Thu, 21 Nov 2024 15:03:35 +0100 Subject: [PATCH] fix: better error handling for multiple election failed --- extkafka/partition_attack_elect_new_leader.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extkafka/partition_attack_elect_new_leader.go b/extkafka/partition_attack_elect_new_leader.go index 976e712..e3d5602 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, result.Err) + errs = append(errs, errors.New(fmt.Sprintf("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),