Skip to content

Commit

Permalink
[8.x] Properly display stacktrace for errors in extractor/sink tasks (#…
Browse files Browse the repository at this point in the history
…2881) (#2901)

Co-authored-by: Artem Shelkovnikov <artem.shelkovnikov@elastic.co>
  • Loading branch information
github-actions[bot] and artem-shelkovnikov authored Nov 4, 2024
1 parent 87ceab7 commit dfe7af5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions connectors/es/sink.py
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,8 @@ def sink_task_callback(self, task):
)
elif task.exception():
self._logger.error(
f"Encountered an error in the sync's {type(self._sink).__name__}: {task.get_name()}: {task.exception()}",
f"Encountered an error in the sync's {type(self._sink).__name__}: {task.get_name()}",
exc_info=task.exception(),
)
self.error = task.exception()

Expand All @@ -1069,6 +1070,7 @@ def extractor_task_callback(self, task):
)
elif task.exception():
self._logger.error(
f"Encountered an error in the sync's {type(self._extractor).__name__}: {task.get_name()}: {task.exception()}",
f"Encountered an error in the sync's {type(self._extractor).__name__}: {task.get_name()}",
exc_info=task.exception(),
)
self.error = task.exception()

0 comments on commit dfe7af5

Please sign in to comment.