AlchemyCMS / alchemy_cms

Alchemy is the Open Source Rails CMS framework for the component based web that can be used as classic server side rendered or headless CMS.
https://www.alchemy-cms.com
BSD 3-Clause "New" or "Revised" License
839 stars 315 forks source link

Return 422 on validation error #2869

Closed tvdeyen closed 3 months ago

tvdeyen commented 4 months ago

What is this pull request for?

Instead of returning 200 (ok) we should return 422 (Unprocessable Content) and display the error messages.

Checklist

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.99%. Comparing base (8114970) to head (30ef25f).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2869 +/- ## ========================================== + Coverage 95.96% 95.99% +0.03% ========================================== Files 232 232 Lines 6271 6271 ========================================== + Hits 6018 6020 +2 + Misses 253 251 -2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sascha-karnatz commented 3 months ago

Nice