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

Allow for exceptions to be annotated with a @ResponseStatus annotation [SPR-5625] #10296

Closed
spring-projects-issues opened this issue Mar 27, 2009 · 0 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

Arjen Poutsma opened SPR-5625 and commented

It would be nice to annotate an exception like so:

@ResponseStatus(410)
public class MyException extends Exception {
...
}

and if that exception occurs in a web application, let the response status code be set to the value indicated by the annotation.


Referenced from: commits 04b3edc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants