Skip to content

Commit

Permalink
Don't require status.details in gRPC error
Browse files Browse the repository at this point in the history
  • Loading branch information
dandavison committed Dec 19, 2024
1 parent 7251fdf commit 5a06a6a
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions temporalio/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -6098,17 +6098,22 @@ def on_start(
st
for st in multiop_failure.statuses
if (
st.details
and not st.details[0].Is(
temporalio.api.failure.v1.MultiOperationExecutionAborted.DESCRIPTOR
st.code != RPCStatusCode.OK
and not (
st.details
and st.details[0].Is(
temporalio.api.failure.v1.MultiOperationExecutionAborted.DESCRIPTOR
)
)
and st.code != RPCStatusCode.OK
)
),
None,
)
if status and status.code in list(RPCStatusCode):
if status.code == RPCStatusCode.ALREADY_EXISTS:
if (
status.code == RPCStatusCode.ALREADY_EXISTS
and status.details
):
details = temporalio.api.errordetails.v1.WorkflowExecutionAlreadyStartedFailure()
if status.details[0].Unpack(details):
err = temporalio.exceptions.WorkflowAlreadyStartedError(
Expand Down

0 comments on commit 5a06a6a

Please sign in to comment.