Skip to content

Commit d7aa7fd

Browse files
committed
Feature
1 parent 85538e2 commit d7aa7fd

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

temporalio/worker/_nexus.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
import temporalio.common
3333
import temporalio.converter
3434
import temporalio.nexus
35-
from temporalio.exceptions import ApplicationError
35+
from temporalio.exceptions import ApplicationError, WorkflowAlreadyStartedError
3636
from temporalio.nexus import Info, logger
3737
from temporalio.service import RPCError, RPCStatusCode
3838

@@ -445,6 +445,12 @@ def _exception_to_handler_error(err: BaseException) -> nexusrpc.HandlerError:
445445
type=nexusrpc.HandlerErrorType.INTERNAL,
446446
retryable_override=not err.non_retryable,
447447
)
448+
elif isinstance(err, WorkflowAlreadyStartedError):
449+
handler_err = nexusrpc.HandlerError(
450+
err.message,
451+
type=nexusrpc.HandlerErrorType.INTERNAL,
452+
retryable_override=False,
453+
)
448454
elif isinstance(err, RPCError):
449455
if err.status == RPCStatusCode.INVALID_ARGUMENT:
450456
handler_err = nexusrpc.HandlerError(

0 commit comments

Comments
 (0)