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

More explicit subject creation validation #59

Open
blootsvoets opened this issue Jun 17, 2020 · 0 comments
Open

More explicit subject creation validation #59

blootsvoets opened this issue Jun 17, 2020 · 0 comments

Comments

@blootsvoets
Copy link
Member

There are three things about the user creation validation that are not completely right

  • A bad request should give HTTP Status 400 (bad request, syntax or properties don't match) or 422 (Unprocessable Entity, syntax and properties are correct, but the command cannot be processed anyway), not 417 (Expectation Failed), which is specifically meant for the Expect HTTP header not matching.
    @ResponseStatus(value = HttpStatus.EXPECTATION_FAILED, reason = "Validation Failed for the Request.")
  • The validation of a request should give a reason in the response, not just state that the request was not valid.
  • The frontend should show this reason, and not just keep the page exactly as it was, like no request happened.
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

1 participant