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 #38 -- Return 400 if the given step is not found #47

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gchp
Copy link
Contributor

@gchp gchp commented Jun 5, 2015

No description provided.

@jpic
Copy link

jpic commented Jan 5, 2017

LGTM

jsma added a commit to jsma/django-formtools that referenced this pull request Oct 29, 2022
Previously, bots could and would stuff this form value with all kinds of nonsense, triggering a server error (and subsequent alert emails).
Supersedes jazzband#47
@jnns
Copy link

jnns commented Jun 20, 2023

If a client requests a non-existing step it technically is a BadRequest but there are situations in which it is not the client's fault.

For example, if conditional steps are involved and a condition for a step is not met anymore although a client already began a session in which they are currently at the now missing step NamedURLWizardView.get_form() will raise a KeyError exception.

In this case I personally find it more helpful to redirect the client to the first step than to return a status code 500 (current behaviour) or 400.

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.

None yet

3 participants