diff --git a/data-prepper-plugins/rds-source/src/main/java/org/opensearch/dataprepper/plugins/source/rds/stream/StreamWorker.java b/data-prepper-plugins/rds-source/src/main/java/org/opensearch/dataprepper/plugins/source/rds/stream/StreamWorker.java index ed88b196b6..0b92e19d85 100644 --- a/data-prepper-plugins/rds-source/src/main/java/org/opensearch/dataprepper/plugins/source/rds/stream/StreamWorker.java +++ b/data-prepper-plugins/rds-source/src/main/java/org/opensearch/dataprepper/plugins/source/rds/stream/StreamWorker.java @@ -14,7 +14,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.io.IOException; import java.util.Optional; public class StreamWorker { @@ -57,12 +56,12 @@ public void processStream(final StreamPartition streamPartition) { try { LOG.info("Connect to database to read change events."); binaryLogClient.connect(); - } catch (IOException e) { + } catch (Exception e) { throw new RuntimeException(e); } finally { try { binaryLogClient.disconnect(); - } catch (IOException e) { + } catch (Exception e) { LOG.error("Binary log client failed to disconnect.", e); } }