@@ -410,15 +410,15 @@ def _handle_produce_response(self, node_id, send_time, batches, response):
410410 log_append_time = - 1
411411 log_start_offset = - 1
412412 record_errors = ()
413- global_error = None
413+ error_message = None
414414 if response .API_VERSION < 2 :
415415 partition , error_code , base_offset = partition_info
416416 elif 2 <= response .API_VERSION <= 4 :
417417 partition , error_code , base_offset , log_append_time = partition_info
418418 elif 5 <= response .API_VERSION <= 7 :
419419 partition , error_code , base_offset , log_append_time , log_start_offset = partition_info
420420 else :
421- partition , error_code , base_offset , log_append_time , log_start_offset , record_errors , global_error = partition_info
421+ partition , error_code , base_offset , log_append_time , log_start_offset , record_errors , error_message = partition_info
422422 tp = TopicPartition (topic , partition )
423423 batch = batches_by_partition [tp ]
424424 partition_response = PartitionResponse (
@@ -428,7 +428,7 @@ def _handle_produce_response(self, node_id, send_time, batches, response):
428428 log_append_time = log_append_time ,
429429 log_start_offset = log_start_offset ,
430430 record_errors = record_errors ,
431- error_message = global_error ,
431+ error_message = error_message ,
432432 )
433433 self ._complete_batch (batch , partition_response )
434434 else :
0 commit comments