Skip to content

Commit 196adbe

Browse files
committed
Update docstring, fix usage
1 parent 4e7eeeb commit 196adbe

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

durabletask/entities/entity_instance_id.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,13 @@ def parse(entity_id: str) -> "EntityInstanceId":
2727
2828
Returns
2929
-------
30-
Optional[EntityInstanceId]
31-
The parsed EntityInstanceId object, or None if the input is None.
30+
EntityInstanceId
31+
The parsed EntityInstanceId object.
32+
33+
Raises
34+
------
35+
ValueError
36+
If the input string is not in the correct format.
3237
"""
3338
try:
3439
_, entity, key = entity_id.split("@", 2)

durabletask/worker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ def _execute_entity_batch(
753753
try:
754754
entity_instance_id = EntityInstanceId.parse(instance_id)
755755
except ValueError:
756-
raise RuntimeError(f"Invalid entity instance ID '{operation.requestId}' in entity operation request.")
756+
raise RuntimeError(f"Invalid entity instance ID '{instance_id}' in entity operation request.")
757757

758758
operation_result = None
759759

0 commit comments

Comments
 (0)