improve error handling in update agent

This commit is contained in:
Saumya 2025-07-25 15:20:25 +05:30
parent 40a145552f
commit 3f54a318ff
1 changed files with 7 additions and 7 deletions

View File

@ -426,13 +426,13 @@ class PipedreamManager:
agentpress_tools=agentpress_tools, agentpress_tools=agentpress_tools,
change_description=f"Updated {profile.app_name} tools" change_description=f"Updated {profile.app_name} tools"
) )
try: update_result = await client.table('agents').update({
update_result = await client.table('agents').update({ 'custom_mcps': updated_custom_mcps,
'custom_mcps': updated_custom_mcps, 'current_version_id': new_version['version_id']
'current_version_id': new_version['version_id'] }).eq('agent_id', agent_id).execute()
}).eq('agent_id', agent_id).execute()
except Exception as e: if not update_result.data:
pass raise ValueError("Failed to update agent configuration")
return { return {
'success': True, 'success': True,