From 786453ac9abf287f18c72385e28fd7eaa98447ad Mon Sep 17 00:00:00 2001 From: David Juhasz Date: Tue, 18 Jun 2024 13:25:01 -0700 Subject: [PATCH] Always evaluate preprocessing workflow Outcome --- internal/workflow/processing.go | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/internal/workflow/processing.go b/internal/workflow/processing.go index 3815fb656..d32d5d38c 100644 --- a/internal/workflow/processing.go +++ b/internal/workflow/processing.go @@ -946,18 +946,16 @@ func (w *ProcessingWorkflow) preprocessing(ctx temporalsdk_workflow.Context, tin if err != nil { return err } - - switch ppResult.Outcome { - case preprocessing.OutcomeSuccess: - return nil - case preprocessing.OutcomeSystemError: - return errors.New("preprocessing workflow: system error") - case preprocessing.OutcomeContentError: - return errors.New("preprocessing workflow: validation failed") - default: - return fmt.Errorf("preprocessing workflow: unknown outcome %d", ppResult.Outcome) - } } - return nil + switch ppResult.Outcome { + case preprocessing.OutcomeSuccess: + return nil + case preprocessing.OutcomeSystemError: + return errors.New("preprocessing workflow: system error") + case preprocessing.OutcomeContentError: + return errors.New("preprocessing workflow: validation failed") + default: + return fmt.Errorf("preprocessing workflow: unknown outcome %d", ppResult.Outcome) + } }