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: Schema validation errors correctly returned as 422 #2828

Conversation

McPizza0
Copy link
Contributor

@McPizza0 McPizza0 commented Dec 2, 2024

Description 📣

When input schema validation failed, the server would return a HTTP code 401 which could in some cases break the client.
This PR changes the schema validation HTTP error code to be 422 (Unprocessable Content) to be inline with standards.

CleanShot 2024-12-02 at 23 51 41@2x

Type ✨

  • Bug fix
  • New feature
  • Improvement
  • Breaking change
  • Documentation

Tests 🛠️

Manual Testing


@McPizza0 McPizza0 marked this pull request as ready for review December 2, 2024 23:59
@McPizza0 McPizza0 changed the title fix: Schema validation errors correctly returned as 400 fix: Schema validation errors correctly returned as 422 Dec 3, 2024
@McPizza0 McPizza0 merged commit 7728a47 into main Dec 3, 2024
5 of 6 checks passed
@McPizza0 McPizza0 deleted the omar/eng-1936-backend-input-validation-failure-triggers-401-breaks-client branch December 3, 2024 17:12
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.

2 participants