Results 1 to 3 of 3

Thread: @ResponseStatus "reason" problem?

  1. #1

    Default @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. #2
    Join Date
    Jan 2012
    Posts
    2

    Default I'm going through the same problem, please share the solution if solved it

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

  3. #3
    Join Date
    Aug 2006
    Location
    Brooklyn
    Posts
    556

    Default

    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.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •