Announcement Announcement Module
Collapse
No announcement yet.
@ResponseStatus "reason" problem? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • @ResponseStatus "reason" problem?

    hi everybody

    while trying to create a RESTful ws with @MVC, i have noticed some odd behavior of @ResponseStatus reason property in exception handling:

    @ExceptionHandler(AuthenticationException.class)
    @ResponseStatus(value=HttpStatus.FORBIDDEN, reason="user authentication failed")
    public void handleUsernameNotFoundException(UsernameNotFoundEx ception unfEx) { }

    the actual response i get is code 403 as expected, but "Forbidden" as status reason, which should not be - it should be "user authentication failed" as described in reason. anyone has an idea why don't i get the expected string?

    thanks
    Yuval

  • #2
    I'm going through the same problem, please share the solution if solved it

    I am having some problem, how did you solve it?

    Comment


    • #3
      Running a quick test of the above example I fail to reproduce the issue. If you can isolate it in a minimal project that would help.

      Comment

      Working...
      X