From 1d8e9efcd937e8ab7a476e7546e5c0181e1d3014 Mon Sep 17 00:00:00 2001 From: David Gomes <10091092+davidgomesdev@users.noreply.github.com> Date: Tue, 30 Apr 2024 16:53:34 +0100 Subject: [PATCH] Keep original error in reader (#289) --- 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) }