581
}
582
583
>
func handleNonRetryableStartOperationError(node *hsm.Node, operation Operation, callErr error) error {
executors.go
584
>
eventID, err := hsm.EventIDFromToken(operation.ScheduledEventToken)
585
>
if err != nil {
586
return err
587
}
588
>
cause, err := callErrToFailure(callErr, false)
executors.go
589
>
if err != nil {
590
return err
591
}
592
>
attrs := &historypb.NexusOperationFailedEventAttributes{
executors.go
593
>
Failure: createNexusOperationFailure(
594
>
operation,
595
>
eventID,
596
>
cause,
597
>
),
598
>
ScheduledEventId: eventID,
599
>
RequestId: operation.RequestId,
600
>
}
601
>
event := node.AddHistoryEvent(enumspb.EVENT_TYPE_NEXUS_OPERATION_FAILED, func(e *historypb.HistoryEvent) {
602
>
// nolint:revive // We must mutate here even if the linter doesn't like it.
603
>
e.Attributes = &historypb.HistoryEvent_NexusOperationFailedEventAttributes{
604
>
NexusOperationFailedEventAttributes: attrs,
605
>
}
606
>
})
607
608
>
return FailedEventDefinition{}.Apply(node.Parent, event)
executors.go
609
}
610