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

Please add static unprocessableEntity() builder method to ResponseEntity [SPR-12515] #17120

Closed
spring-projects-issues opened this issue Dec 5, 2014 · 3 comments
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Dec 5, 2014

Marcel Overdijk opened SPR-12515 and commented

Lately I'm using http 422 Unprocessable Entity for returning validation errors. instead of a 400. It seems many public api's are changing to this (like github api).

So please add a static unprocessableEntity() builder method to ResponseEntity to have a shortcut for returning this http code.

This just like earlier request like #16686 and #16728.


Affects: 4.1.2

Issue Links:

Referenced from: commits 1daa5eb, 0524a82

@spring-projects-issues
Copy link
Collaborator Author

Marcel Overdijk commented

Created #705

@spring-projects-issues
Copy link
Collaborator Author

Marcel Overdijk commented

@Jurgen I made a stupid mistake in my PR. The unprocessableEntity() should return a BodyBuilder and not a HeadersBuilder<?>.

I'm currently not behind my dev laptop so cannot update the PR (yet).

@spring-projects-issues
Copy link
Collaborator Author

Rossen Stoyanchev commented

Should be fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants