Spring Framework
  1. Spring Framework
  2. SPR-9312

DefaultHandlerExceptionResolver doesn't provide a reason when sending error responses

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Complete
    • Affects Version/s: 3.1.1
    • Fix Version/s: 3.2 M2
    • Component/s: Web
    • Last commented by a User:
      false

      Description

      For example, when a required @RequestParam is missing from the request a 400 status is sent but no error message is sent. This results in a REST API returning something like:

      HTTP/1.1 400 Bad Request
      {"message":""}
      

      or no message at all.

      It would be helpful if a general reason was at least provided e.g. "missing required query parameter". This wouldn't hurt anything while improving debugging ability for developers.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Rossen Stoyanchev
            Reporter:
            Keith Donald
            Last updater:
            Rossen Stoyanchev
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since last comment:
              2 years, 2 weeks, 2 days ago