Skip to content

Commit c640feb

Browse files
authored
Return typedError instead of err (#309)
1 parent ea8e76a commit c640feb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

e2e/topic.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,13 @@ func (s *Service) executeAlterPartitionAssignments(ctx context.Context, req *kms
142142

143143
typedErr := kerr.TypedErrorForCode(res.ErrorCode)
144144
if typedErr != nil {
145-
return fmt.Errorf("inner Kafka error: %w", err)
145+
return fmt.Errorf("inner Kafka error: %w", typedErr)
146146
}
147147
for _, topic := range res.Topics {
148148
for _, partition := range topic.Partitions {
149149
typedErr = kerr.TypedErrorForCode(partition.ErrorCode)
150150
if typedErr != nil {
151-
return fmt.Errorf("inner Kafka partition error on partition '%v': %w", partition.Partition, err)
151+
return fmt.Errorf("inner Kafka partition error on partition '%v': %w", partition.Partition, typedErr)
152152
}
153153
}
154154
}

0 commit comments

Comments
 (0)