mirror of https://github.com/kortix-ai/suna.git
improve error handling in update agent
This commit is contained in:
parent
40a145552f
commit
3f54a318ff
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue