@@ -231,9 +231,10 @@ func (cl *Client) createTopics(ctx context.Context, dry bool, p int32, rf int16,
231
231
232
232
// DeleteTopicResponse contains the response for an individual deleted topic.
233
233
type DeleteTopicResponse struct {
234
- Topic string // Topic is the topic that was deleted, if not using topic IDs.
235
- ID TopicID // ID is the topic ID for this topic, if talking to Kafka v2.8+ and using topic IDs.
236
- Err error // Err is any error preventing this topic from being deleted.
234
+ Topic string // Topic is the topic that was deleted, if not using topic IDs.
235
+ ID TopicID // ID is the topic ID for this topic, if talking to Kafka v2.8+ and using topic IDs.
236
+ Err error // Err is any error preventing this topic from being deleted.
237
+ ErrMessage string // ErrMessage a potential extra message describing any error.
237
238
}
238
239
239
240
// DeleteTopicResponses contains per-topic responses for deleted topics.
@@ -311,9 +312,10 @@ func (cl *Client) DeleteTopics(ctx context.Context, topics ...string) (DeleteTop
311
312
topic = * t .Topic
312
313
}
313
314
rs [topic ] = DeleteTopicResponse {
314
- Topic : topic ,
315
- ID : t .TopicID ,
316
- Err : kerr .ErrorForCode (t .ErrorCode ),
315
+ Topic : topic ,
316
+ ID : t .TopicID ,
317
+ Err : kerr .ErrorForCode (t .ErrorCode ),
318
+ ErrMessage : unptrStr (t .ErrorMessage ),
317
319
}
318
320
}
319
321
return rs , nil
@@ -457,8 +459,9 @@ func (cl *Client) DeleteRecords(ctx context.Context, os Offsets) (DeleteRecordsR
457
459
// CreatePartitionsResponse contains the response for an individual topic from
458
460
// a create partitions request.
459
461
type CreatePartitionsResponse struct {
460
- Topic string // Topic is the topic this response is for.
461
- Err error // Err is non-nil if partitions were unable to be added to this topic.
462
+ Topic string // Topic is the topic this response is for.
463
+ Err error // Err is non-nil if partitions were unable to be added to this topic.
464
+ ErrMessage string // ErrMessage a potential extra message describing any error.
462
465
}
463
466
464
467
// CreatePartitionsResponses contains per-topic responses for a create
@@ -584,8 +587,9 @@ func (cl *Client) createPartitions(ctx context.Context, dry bool, add, set int,
584
587
rs := make (CreatePartitionsResponses )
585
588
for _ , t := range resp .Topics {
586
589
rs [t .Topic ] = CreatePartitionsResponse {
587
- Topic : t .Topic ,
588
- Err : kerr .ErrorForCode (t .ErrorCode ),
590
+ Topic : t .Topic ,
591
+ Err : kerr .ErrorForCode (t .ErrorCode ),
592
+ ErrMessage : unptrStr (t .ErrorMessage ),
589
593
}
590
594
}
591
595
return rs , nil
0 commit comments