Skip to content

Made VersionField raise correct Django exception #155

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

Closed

Conversation

catvec
Copy link

@catvec catvec commented Apr 4, 2024

When using the Django VersionField if a string doesn't match the semver formatting a ValueError is raised. This is an issue because Django interprets this as a 500 server error instead of an issue with the user's input. The Django docs indicate that you should raise a ValidationError in order for the correct machinery to display this error to the user.

@catvec
Copy link
Author

catvec commented Apr 4, 2024

Duplicate of #106

@catvec catvec closed this Apr 4, 2024
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.

1 participant