diff --git a/agents-api/agents_api/models/execution/create_execution_transition.py b/agents-api/agents_api/models/execution/create_execution_transition.py index f40395126..2b1c09ae8 100644 --- a/agents-api/agents_api/models/execution/create_execution_transition.py +++ b/agents-api/agents_api/models/execution/create_execution_transition.py @@ -176,7 +176,7 @@ def create_execution_transition( data=UpdateExecutionRequest( status=transition_to_execution_status[data.type] ), - output=data.output if data.type == "finish" else None, + output=data.output if data.type != "error" else None, error=str(data.output) if data.type == "error" and data.output else None,