From f84d2dc4812ee64044bbc6482ecf81d3ffcc86e2 Mon Sep 17 00:00:00 2001 From: David Gomes <10091092+davidgomesdev@users.noreply.github.com> Date: Mon, 29 Apr 2024 16:49:13 +0100 Subject: [PATCH] Keep original error in reader --- reader.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reader.go b/reader.go index 09ee5d0..3c04fd0 100644 --- a/reader.go +++ b/reader.go @@ -342,7 +342,7 @@ func (k *Kafka) consume( if err != nil { k.reportReaderStats(reader.Stats()) - err = NewXk6KafkaError(failedReadMessage, "Unable to read messages.", nil) + err = NewXk6KafkaError(failedReadMessage, "Unable to read messages.", err) logger.WithField("error", err).Error(err) common.Throw(k.vu.Runtime(), err) }