Skip to content

Commit

Permalink
add logger.exception in resync_error_handler
Browse files Browse the repository at this point in the history
  • Loading branch information
Tankilevitch committed Aug 3, 2023
1 parent 5fa49bc commit 799066b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions port_ocean/core/integrations/mixins/utils.py
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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
Expand Down

0 comments on commit 799066b

Please sign in to comment.