diff --git a/temporalio/exceptions.py b/temporalio/exceptions.py index 8f0423153..d386d4327 100644 --- a/temporalio/exceptions.py +++ b/temporalio/exceptions.py @@ -83,8 +83,8 @@ class ActivityAlreadyStartedError(FailureError): def __init__( self, activity_id: str, activity_type: str, *, run_id: str | None = None ) -> None: - """Initialize a workflow already started error.""" - super().__init__("Workflow execution already started") + """Initialize an activity already started error.""" + super().__init__("Activity execution already started") self.activity_id = activity_id self.activity_type = activity_type self.run_id = run_id diff --git a/tests/test_activity.py b/tests/test_activity.py index 0b6abaf80..0d9bfecad 100644 --- a/tests/test_activity.py +++ b/tests/test_activity.py @@ -847,6 +847,9 @@ async def test_id_conflict_policy_fail(client: Client, env: WorkflowEnvironment) id_conflict_policy=ActivityIDConflictPolicy.FAIL, ) assert err.value.activity_id == activity_id + assert "Activity" in str( + err.value + ), f"Expected 'Activity' in error message, got: {err.value}" async def test_id_conflict_policy_use_existing(