Navigation Menu

Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Model validation failures cause a 422 response with no body #1809

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 1 comment
Closed

Comments

@openstreetmap-trac
Copy link

Reporter: tom[at]compton.nu
[Submitted to the original trac issue database at 11.06pm, Saturday, 9th May 2009]

If a model validation fails then ActiveRecord::RecordInvalid is thrown and the rails default rescue handler converts that to a 422 HTTP response. We should catch it in the upload controller method (and anywhere else that saves a model...) and return a sensible error.

@openstreetmap-trac
Copy link
Author

Author: tom[at]compton.nu
[Added to the original trac issue at 11.56am, Sunday, 10th May 2009]

Fixed in r14986.

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

No branches or pull requests

1 participant