**[Sola](https://jira.spring.io/secure/ViewProfile.jspa?name=sola)** opened **[SPR-14206](https://jira.spring.io/browse/SPR-14206?redirect=false)** and commented HttpSessionRequiredException should have a getter for 'missing session attribute',It can bring more convince to exception handling. ideal code snippet: ```java @ExceptionHandler(HttpSessionRequiredException.class) ResponseEntity<Error> unauthorizedException(HttpSessionRequiredException e) { if(e.getAttributeName().equals("username")){ //do something else, } return //something } ``` --- **Affects:** 4.2.5, 4.3 RC1 **Reference URL:** https://github.com/spring-projects/spring-framework/blob/master/spring-web/src/main/java/org/springframework/web/HttpSessionRequiredException.java **Referenced from:** commits https://github.com/spring-projects/spring-framework/commit/e5d52a96a7c3a80100b0239f4fd7165e1bbb7a06