diff --git a/temporalio/lib/temporalio/internal/client/implementation.rb b/temporalio/lib/temporalio/internal/client/implementation.rb index 59cb9f6c..dcc0ae08 100644 --- a/temporalio/lib/temporalio/internal/client/implementation.rb +++ b/temporalio/lib/temporalio/internal/client/implementation.rb @@ -228,7 +228,7 @@ def start_update_with_start_workflow(input) if details e = Error::WorkflowAlreadyStartedError.new( workflow_id: start_options.id, - workflow_type: start_req.workflow_type, + workflow_type: start_req.workflow_type.name, run_id: details.run_id ) end diff --git a/temporalio/test/worker_workflow_handler_test.rb b/temporalio/test/worker_workflow_handler_test.rb index 4e3fd48a..c4ab8880 100644 --- a/temporalio/test/worker_workflow_handler_test.rb +++ b/temporalio/test/worker_workflow_handler_test.rb @@ -742,14 +742,16 @@ def test_update_with_start_simple UpdateWithStartWorkflow, 123, id:, task_queue: worker.task_queue, id_conflict_policy: Temporalio::WorkflowIDConflictPolicy::FAIL ) - assert_raises(Temporalio::Error::WorkflowAlreadyStartedError) do + err = assert_raises(Temporalio::Error::WorkflowAlreadyStartedError) do env.client.execute_update_with_start_workflow( UpdateWithStartWorkflow.increment_counter, 456, start_workflow_operation: ) end - assert_raises(Temporalio::Error::WorkflowAlreadyStartedError) do + assert_equal 'UpdateWithStartWorkflow', err.workflow_type + err = assert_raises(Temporalio::Error::WorkflowAlreadyStartedError) do start_workflow_operation.workflow_handle end + assert_equal 'UpdateWithStartWorkflow', err.workflow_type end end @@ -830,15 +832,17 @@ def test_update_with_start_start_fail UpdateWithStartWorkflow, 123, id:, task_queue: worker.task_queue, id_conflict_policy: Temporalio::WorkflowIDConflictPolicy::FAIL ) - assert_raises(Temporalio::Error::WorkflowAlreadyStartedError) do + err = assert_raises(Temporalio::Error::WorkflowAlreadyStartedError) do env.client.start_update_with_start_workflow( UpdateWithStartWorkflow.increment_counter, 456, wait_for_stage: Temporalio::Client::WorkflowUpdateWaitStage::ACCEPTED, start_workflow_operation: ) end - assert_raises(Temporalio::Error::WorkflowAlreadyStartedError) do + assert_equal 'UpdateWithStartWorkflow', err.workflow_type + err = assert_raises(Temporalio::Error::WorkflowAlreadyStartedError) do start_workflow_operation.workflow_handle end + assert_equal 'UpdateWithStartWorkflow', err.workflow_type end end