chore: add count to thrown error
This commit is contained in:
parent
4bd0abc93f
commit
067beece75
|
@ -324,12 +324,12 @@ on_query(
|
||||||
}),
|
}),
|
||||||
do_send_msg(sync, KafkaMessage, Producers, SyncTimeout)
|
do_send_msg(sync, KafkaMessage, Producers, SyncTimeout)
|
||||||
catch
|
catch
|
||||||
error:{invalid_partition_count, _Count, _Partitioner} ->
|
error:{invalid_partition_count, Count, _Partitioner} ->
|
||||||
?tp("kafka_producer_invalid_partition_count", #{
|
?tp("kafka_producer_invalid_partition_count", #{
|
||||||
action_id => MessageTag,
|
action_id => MessageTag,
|
||||||
query_mode => sync
|
query_mode => sync
|
||||||
}),
|
}),
|
||||||
{error, {unrecoverable_error, invalid_partition_count}};
|
{error, {unrecoverable_error, {invalid_partition_count, Count}}};
|
||||||
throw:{bad_kafka_header, _} = Error ->
|
throw:{bad_kafka_header, _} = Error ->
|
||||||
?tp(
|
?tp(
|
||||||
emqx_bridge_kafka_impl_producer_sync_query_failed,
|
emqx_bridge_kafka_impl_producer_sync_query_failed,
|
||||||
|
@ -390,12 +390,12 @@ on_query_async(
|
||||||
}),
|
}),
|
||||||
do_send_msg(async, KafkaMessage, Producers, AsyncReplyFn)
|
do_send_msg(async, KafkaMessage, Producers, AsyncReplyFn)
|
||||||
catch
|
catch
|
||||||
error:{invalid_partition_count, _Count, _Partitioner} ->
|
error:{invalid_partition_count, Count, _Partitioner} ->
|
||||||
?tp("kafka_producer_invalid_partition_count", #{
|
?tp("kafka_producer_invalid_partition_count", #{
|
||||||
action_id => MessageTag,
|
action_id => MessageTag,
|
||||||
query_mode => async
|
query_mode => async
|
||||||
}),
|
}),
|
||||||
{error, {unrecoverable_error, invalid_partition_count}};
|
{error, {unrecoverable_error, {invalid_partition_count, Count}}};
|
||||||
throw:{bad_kafka_header, _} = Error ->
|
throw:{bad_kafka_header, _} = Error ->
|
||||||
?tp(
|
?tp(
|
||||||
emqx_bridge_kafka_impl_producer_async_query_failed,
|
emqx_bridge_kafka_impl_producer_async_query_failed,
|
||||||
|
|
Loading…
Reference in New Issue