Skip to content

Commit 49d6db8

Browse files
authored
Fix ActivityAlreadyStartedError message (#1348)
1 parent 5d83604 commit 49d6db8

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

temporalio/exceptions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ class ActivityAlreadyStartedError(FailureError):
8383
def __init__(
8484
self, activity_id: str, activity_type: str, *, run_id: str | None = None
8585
) -> None:
86-
"""Initialize a workflow already started error."""
87-
super().__init__("Workflow execution already started")
86+
"""Initialize an activity already started error."""
87+
super().__init__("Activity execution already started")
8888
self.activity_id = activity_id
8989
self.activity_type = activity_type
9090
self.run_id = run_id

tests/test_activity.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -847,6 +847,9 @@ async def test_id_conflict_policy_fail(client: Client, env: WorkflowEnvironment)
847847
id_conflict_policy=ActivityIDConflictPolicy.FAIL,
848848
)
849849
assert err.value.activity_id == activity_id
850+
assert "Activity" in str(
851+
err.value
852+
), f"Expected 'Activity' in error message, got: {err.value}"
850853

851854

852855
async def test_id_conflict_policy_use_existing(

0 commit comments

Comments
 (0)