diff --git a/api/routes/public_agent.py b/api/routes/public_agent.py index c04c772..d82cadc 100644 --- a/api/routes/public_agent.py +++ b/api/routes/public_agent.py @@ -133,6 +133,7 @@ async def initiate_call( workflow_id=trigger.workflow_id, mode=workflow_run_mode, initial_context={ + "provider": provider.PROVIDER_NAME, "phone_number": request.phone_number, "agent_uuid": uuid, **(request.initial_context or {}), @@ -158,23 +159,12 @@ async def initiate_call( ) # 10. Initiate call via telephony provider - result = await provider.initiate_call( + await provider.initiate_call( to_number=request.phone_number, webhook_url=webhook_url, workflow_run_id=workflow_run.id, ) - # 11. Store provider metadata in workflow run context - gathered_context = { - "provider": provider.PROVIDER_NAME, - "triggered_by": "api", - "trigger_uuid": uuid, - **(result.provider_metadata or {}), - } - await db_client.update_workflow_run( - run_id=workflow_run.id, gathered_context=gathered_context - ) - logger.info( f"Call initiated successfully for workflow run {workflow_run.id} " f"via trigger {uuid}" diff --git a/api/tasks/run_integrations.py b/api/tasks/run_integrations.py index 2aa8d95..44e981e 100644 --- a/api/tasks/run_integrations.py +++ b/api/tasks/run_integrations.py @@ -31,7 +31,7 @@ async def run_integrations_post_workflow_run(_ctx, workflow_run_id: int): ) if not workflow_run or not workflow_run.workflow: - logger.error("Workflow run or workflow not found") + logger.warning("Workflow run or workflow not found") return if not organization_id: @@ -68,7 +68,7 @@ async def run_integrations_post_workflow_run(_ctx, workflow_run_id: int): ) except Exception as e: # Log error but continue with other webhooks - logger.error( + logger.warning( f"Failed to execute webhook '{webhook_data.get('name', 'unknown')}': {e}" ) @@ -120,7 +120,7 @@ async def _execute_webhook_node( # 2. Validate endpoint URL url = webhook_data.get("endpoint_url") if not url: - logger.error(f"Webhook '{webhook_name}' has no endpoint URL") + logger.warning(f"Webhook '{webhook_name}' has no endpoint URL") return False # 3. Build headers diff --git a/ui/src/app/workflow/[workflowId]/run/[runId]/hooks/useDeviceInputs.tsx b/ui/src/app/workflow/[workflowId]/run/[runId]/hooks/useDeviceInputs.tsx index a7cb232..662f965 100644 --- a/ui/src/app/workflow/[workflowId]/run/[runId]/hooks/useDeviceInputs.tsx +++ b/ui/src/app/workflow/[workflowId]/run/[runId]/hooks/useDeviceInputs.tsx @@ -15,7 +15,7 @@ export const useDeviceInputs = () => { if (defaultAudioInput) { setSelectedAudioInput(defaultAudioInput.deviceId); } - } catch (error) { + } catch { setPermissionError('Could not enumerate devices'); } }, []);