Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always evaluate preprocessing workflow Outcome #966

Merged
merged 1 commit into from
Jun 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 10 additions & 12 deletions internal/workflow/processing.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Loading