48
operation Operation,
49
opErr *nexus.OperationError,
51
>
eventID, err := hsm.EventIDFromToken(operation.ScheduledEventToken)
52
>
if err != nil {
53
return err
54
}
56
>
// Special marker for Temporal->Temporal calls to indicate that the original failure should be unwrapped.
57
>
// Temporal uses a wrapper operation error with no additional information to transmit the OperationError over the network.
58
>
// The meaningful information is in the operation error's cause.
59
>
unwrapError := opErr.OriginalFailure.Metadata["unwrap-error"] == "true"
60
>
61
>
if unwrapError && opErr.OriginalFailure.Cause != nil {
62
var err error
63
originalCause, err = commonnexus.NexusFailureToTemporalFailure(*opErr.OriginalFailure.Cause)