59
}
60
// Run ProcessInput for validation.
61
>
_, err := ch.nexusProcessor.ProcessInput(chasm.NexusOperationProcessorContext{
nexus_commands.go
62
>
Namespace: ns,
63
>
RequestID: requestID,
64
>
// Links are not needed for validation.
65
>
}, attrs.Service, attrs.Operation, attrs.Input)
66
>
if err != nil {
67
>
var handlerErr *nexus.HandlerError
68
>
if errors.As(err, &handlerErr) {
69
>
//nolint:exhaustive
70
>
switch handlerErr.Type {
71
>
case nexus.HandlerErrorTypeNotFound, nexus.HandlerErrorTypeBadRequest:
72
>
return FailWorkflowTaskError{
73
>
Cause: enumspb.WORKFLOW_TASK_FAILED_CAUSE_BAD_SCHEDULE_NEXUS_OPERATION_ATTRIBUTES,
74
>
Message: handlerErr.Message,
75
>
}
76
}
77
}