From a1f69a9d753a8c1541093da46210f62f89a90bba Mon Sep 17 00:00:00 2001 From: Alexander Ermolaev <aleksandr.ermolaev@sbermarket.ru> Date: Tue, 24 Oct 2023 16:31:02 +0300 Subject: [PATCH] Fix string representation of error --- error_codes.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/error_codes.go b/error_codes.go index 9169d4b..07a6012 100644 --- a/error_codes.go +++ b/error_codes.go @@ -2,7 +2,6 @@ package kafka import ( "errors" - "fmt" ) type errCode uint32 @@ -130,7 +129,7 @@ func (e Xk6KafkaError) Error() string { if e.OriginalError == nil { return e.Message } - return fmt.Sprintf(e.Message+", OriginalError: %w", e.OriginalError) + return e.Message + ", OriginalError: " + e.OriginalError.Error() } // Unwrap implements the `xerrors.Wrapper` interface, so Xk6KafkaError are a bit