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

Return a 404 instead of a 500 when there's a ValidationError #4809

Open
sentry-io bot opened this issue Feb 26, 2021 · 0 comments
Open

Return a 404 instead of a 500 when there's a ValidationError #4809

sentry-io bot opened this issue Feb 26, 2021 · 0 comments

Comments

@sentry-io
Copy link

sentry-io bot commented Feb 26, 2021

This error came from a program letter, but I think I've seen it for course certificates and program certificates as well.

Sentry Issue: MICROMASTERS-4VF

ValueError: badly formed hexadecimal UUID string
  File "django/db/models/fields/__init__.py", line 2343, in to_python
    return uuid.UUID(**{input_form: value})
  File "uuid.py", line 177, in __init__
    raise ValueError('badly formed hexadecimal UUID string')

ValidationError: ["'ZDhkNmFiOD' is not a valid UUID."]
(19 additional frame(s) were not displayed)
...
  File "django/db/models/lookups.py", line 260, in process_rhs
    return super().process_rhs(compiler, connection)
  File "django/db/models/lookups.py", line 95, in process_rhs
    return self.get_db_prep_lookup(value, connection)
  File "django/db/models/lookups.py", line 187, in get_db_prep_lookup
    [get_db_prep_value(value, connection, prepared=True)]
  File "django/db/models/fields/__init__.py", line 2333, in get_db_prep_value
    value = self.to_python(value)
  File "django/db/models/fields/__init__.py", line 2345, in to_python
    raise exceptions.ValidationError(
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

No branches or pull requests

0 participants