Skip to content

Commit

Permalink
Properly catch integration execution errors
Browse files Browse the repository at this point in the history
  • Loading branch information
HamadaSalhab committed Nov 16, 2024
1 parent c589dc8 commit 968fe53
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions agents-api/agents_api/activities/execute_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ async def execute_integration(
arguments=arguments,
)

if hasattr(integration_service_response, "error"):
raise Exception(integration_service_response.error)

if "error" in integration_service_response:
raise Exception(integration_service_response["error"])

return integration_service_response

Expand Down

0 comments on commit 968fe53

Please sign in to comment.