diff --git a/topic/src/main/java/tech/ydb/topic/impl/GrpcStreamRetrier.java b/topic/src/main/java/tech/ydb/topic/impl/GrpcStreamRetrier.java index a6553f79b..54eea374f 100644 --- a/topic/src/main/java/tech/ydb/topic/impl/GrpcStreamRetrier.java +++ b/topic/src/main/java/tech/ydb/topic/impl/GrpcStreamRetrier.java @@ -137,7 +137,11 @@ protected void onSessionClosed(Status status, Throwable th) { } if (errorsHandler != null) { - errorsHandler.accept(status, th); + try { + errorsHandler.accept(status, th); + } catch (Exception ex) { + getLogger().error("[{}] error handler throws exception", id, ex); + } } if (!isStopped.get()) {