Skip to content

Commit

Permalink
better msg pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
jerrinot committed Sep 9, 2024
1 parent 7bd5e6d commit a910647
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,10 @@ private void onTcpSenderException(Exception e) {

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

0 comments on commit a910647

Please sign in to comment.