Skip to content

Commit a910647

Browse files
committed
better msg pattern
1 parent 7bd5e6d commit a910647

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

connector/src/main/java/io/questdb/kafka/QuestDBSinkTask.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,10 @@ private void onTcpSenderException(Exception e) {
255255

256256
private void onHttpSenderException(Exception e) {
257257
closeSenderSilently();
258-
if (reporter != null & e.getMessage() != null && e.getMessage().contains("error in line")) { // hack to detect data parsing errors
258+
if (
259+
(reporter != null && e.getMessage() != null) // hack to detect data parsing errors
260+
&& (e.getMessage().contains("error in line") || e.getMessage().contains("failed to parse line protocol"))
261+
) {
259262
// ok, we have a parsing error, let's try to send records one by one to find the problematic record
260263
// and we will report it to the error handler. the rest of the records will make it to QuestDB
261264
sender = createSender();

0 commit comments

Comments
 (0)