206
apiFailure.Message = f.Message
207
apiFailure.StackTrace = f.StackTrace
209
>
// Special case for OperationError that adapts from Nexus semantics to Temporal semantics.
210
>
// Note that Temporal -> Temporal doesn't go through this code path, operation errors are always used as empty
211
>
// wrappers for an underlying causes.
212
>
var operationError *nexus.OperationError
213
>
err := json.Unmarshal(f.Details, &operationError)
214
>
if err != nil {
215
return nil, fmt.Errorf("failed to deserialize OperationError: %w", err)
216
}
217
>
if operationError.State == nexus.OperationStateCanceled {
failure.go
218
// Canceled operation errors are represented as CanceledFailure in Temporal.
219
apiFailure.FailureInfo = &failurepb.Failure_CanceledFailureInfo{
220
CanceledFailureInfo: &failurepb.CanceledFailureInfo{},
221
}
223
// Failed operation errors are represented as non-retryable ApplicationFailure in Temporal.
224
apiFailure.FailureInfo = &failurepb.Failure_ApplicationFailureInfo{