Skip to content

@ExceptionHandler should be able to return ResponseEntity [SPR-8839] #13481

@spring-projects-issues

Description

@spring-projects-issues

Dave Syer opened SPR-8839 and commented

@ExceptionHandler should be able to return ResponseEntity, for consistency with @RequestMapping, and to enable custom (dynamic) status codes to be added to the response (@ResponseStatus has to be hardcoded). It's pretty easy to do this - you just add a handler for ResponseEntity to the AnnotationMethodExceptionHandlerResolver.


Affects: 3.0.6

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions