Skip to content

Commit

Permalink
Merge pull request #123 from BobDu/fix-validation-exception
Browse files Browse the repository at this point in the history
fix: no retry ValidationException
  • Loading branch information
sethusrinivasan authored Jan 9, 2024
2 parents 33430c2 + b937507 commit 8b58dd6
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,15 +199,15 @@ public void onWriteError(final List<Record> requestEntries,
final Consumer<List<Record>> dropCompletionConsumer) {
final Class<? extends Exception> exceptionClass = exception.getClass();
LOG.debug("Sending WriteRecordsRequest failed. Starting handling exception: {}", exceptionClass.getName());
if (checkIsRetryableException(exception)) {
handleRetryableException(requestEntries, writeRecordsRequest, exception,
retryOrSuccessCompletionConsumer, dropCompletionConsumer);
} else if (exceptionTypeToExceptionHandleMethod.containsKey(exceptionClass)) {
if (exceptionTypeToExceptionHandleMethod.containsKey(exceptionClass)) {
LOG.debug("Found designated exception handler method.");
exceptionTypeToExceptionHandleMethod
.get(exceptionClass)
.accept(requestEntries, writeRecordsRequest, exception,
retryOrSuccessCompletionConsumer, dropCompletionConsumer);
} else if (checkIsRetryableException(exception)) {
handleRetryableException(requestEntries, writeRecordsRequest, exception,
retryOrSuccessCompletionConsumer, dropCompletionConsumer);
} else {
LOG.debug("No designated exception handler method found. Launching the default handler.");
handleDefaultException(requestEntries, writeRecordsRequest, exception,
Expand Down

0 comments on commit 8b58dd6

Please sign in to comment.