Skip to content

Commit

Permalink
Skip MultiOp statuses with RPCStatusCode.OK
Browse files Browse the repository at this point in the history
  • Loading branch information
dandavison committed Dec 18, 2024
1 parent 429fbe8 commit 51a6dec
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions temporalio/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -6075,15 +6075,13 @@ def on_start(
and not st.details[0].Is(
temporalio.api.failure.v1.MultiOperationExecutionAborted.DESCRIPTOR
)
and st.code != RPCStatusCode.OK
)
),
None,
)
if status and status.code in RPCStatusCode:
if (
status.code == RPCStatusCode.ALREADY_EXISTS
and status.details
):
if status.code == RPCStatusCode.ALREADY_EXISTS:
details = temporalio.api.errordetails.v1.WorkflowExecutionAlreadyStartedFailure()
if status.details[0].Unpack(details):
err = temporalio.exceptions.WorkflowAlreadyStartedError(
Expand Down

0 comments on commit 51a6dec

Please sign in to comment.