[go: up one dir, main page]

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

fix(wf): update resp code on wf start #8101

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sicoyle
Copy link
Contributor
@sicoyle sicoyle commented Sep 13, 2024

Description

In cases like this where users are trying to start a workflow that already exists, they should see a 400 error code to indicate that this is a "bad" request that they are trying to perform. A 500 response code is extreme here in the case that this is a client side error.

{"errorCode":"ERR_START_WORKFLOW","message":"error starting workflow 'SimpleWorkflow': unable to start workflow: failed to start orchestration: error from internal actor: an active workflow with ID 'SimpleWorkflow' already exists"}

where would be the best place to add tests for this change? @cicoyle @JoshVanL

Issue reference

Please reference the issue this PR will close: #[issue number]

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

Signed-off-by: Samantha Coyle <sam@diagrid.io>
@sicoyle sicoyle requested review from a team as code owners September 13, 2024 14:30
@cicoyle
Copy link
Contributor
cicoyle commented Sep 13, 2024

You could probably add to this test: https://github.com/dapr/dapr/blob/master/tests/integration/suite/daprd/workflow/basic.go#L269

@JoshVanL
Copy link
Contributor

You could probably add to this test: https://github.com/dapr/dapr/blob/master/tests/integration/suite/daprd/workflow/basic.go#L269

Please can we add a new tests/integration/suite/daprd/workflow/errors.go file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants