Skip to content

Commit

Permalink
Fix string representation of error (#257)
Browse files Browse the repository at this point in the history
Co-authored-by: Alexander Ermolaev <[email protected]>
  • Loading branch information
aermolaev and Alexander Ermolaev authored Oct 24, 2023
1 parent de7bf8f commit a99dcc7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions error_codes.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package kafka

import (
"errors"
"fmt"
)

type errCode uint32
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a99dcc7

Please sign in to comment.