Skip to content

Commit

Permalink
Improve error logging in the actions runner
Browse files Browse the repository at this point in the history
  • Loading branch information
marianobrc committed Jan 3, 2025
1 parent 5e6eaaf commit d6c89f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/services/action_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async def execute_action(integration_id: str, action_id: str, config_overrides:
# ToDo: Store configs and update it on changes (event-driven architecture)
integration = await _portal.get_integration_details(integration_id=integration_id)
except Exception as e:
message = f"Error retrieving configuration for integration '{integration_id}': {e}"
message = f"Error retrieving integration '{integration_id}': {type(e)}: {e}"
logger.exception(message)
await publish_event(
event=IntegrationActionFailed(
Expand Down Expand Up @@ -118,7 +118,7 @@ async def execute_action(integration_id: str, action_id: str, config_overrides:
content=jsonable_encoder({"detail": message}),
)
except Exception as e:
message = f"Internal error executing action '{action_id}': {e}"
message = f"Internal error executing action '{action_id}' for integration '{integration_id}': {type(e)}: {e}"
logger.exception(message)
await publish_event(
event=IntegrationActionFailed(
Expand Down

0 comments on commit d6c89f6

Please sign in to comment.