From 6b548b85d8f46c00c9e3f5601febbdd1e41ae3d1 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Sun, 22 Sep 2024 12:03:28 +0200 Subject: [PATCH] MongoDB: Improve error reporting --- CHANGES.md | 1 + cratedb_toolkit/io/mongodb/api.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index f56cbe4..8265cbf 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,7 @@ ## Unreleased - Table Loader: Improved conditional handling of "transformation" parameter - Table Loader: Improved status reporting and error logging in `BulkProcessor` +- MongoDB: Improve error reporting ## 2024/09/19 v0.0.24 - MongoDB Full: Refactor transformation subsystem to `commons-codec` diff --git a/cratedb_toolkit/io/mongodb/api.py b/cratedb_toolkit/io/mongodb/api.py index 12c05ca..37c7cd2 100644 --- a/cratedb_toolkit/io/mongodb/api.py +++ b/cratedb_toolkit/io/mongodb/api.py @@ -169,7 +169,7 @@ def mongodb_copy( try: outcome_task = task.start() except (Exception, PanicException) as ex: - logger.error(f"Task failed: {ex}") + logger.exception(f"Task failed: {ex}") outcome_task = False outcome = outcome and outcome_task