From 799066bd8e3cc4f53e99af1a69a690391a404147 Mon Sep 17 00:00:00 2001 From: tankilevitch Date: Thu, 3 Aug 2023 16:57:17 +0300 Subject: [PATCH] add logger.exception in resync_error_handler --- port_ocean/core/integrations/mixins/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/port_ocean/core/integrations/mixins/utils.py b/port_ocean/core/integrations/mixins/utils.py index 8329186949..3fd0bd0b6d 100644 --- a/port_ocean/core/integrations/mixins/utils.py +++ b/port_ocean/core/integrations/mixins/utils.py @@ -1,6 +1,7 @@ from contextlib import contextmanager from typing import Awaitable, Generator, Callable +from loguru import logger from port_ocean.core.ocean_types import ( ASYNC_GENERATOR_RESYNC_TYPE, RAW_RESULT, @@ -20,6 +21,8 @@ def resync_error_handling() -> Generator[None, None, None]: except StopAsyncIteration: raise except Exception as error: + # logger.exception is used to log the exception with the traceback + logger.exception("Failed to execute resync function") raise OceanAbortException( f"Failed to execute resync function, error: {error}" ) from error