Skip to content

v4.13.0

Choose a tag to compare

@github-actions github-actions released this 02 Jun 19:04
· 75 commits to main since this release
  • Improved Exception Handling
    • Don't log 400 Bad Request Stack Trace

Migration Notes

In web.xml replace:

    <error-page>
        <error-code>500</error-code>
        <location>/error</location>
    </error-page>
    <error-page>
        <error-code>404</error-code>
        <location>/error</location>
    </error-page>
    <error-page>
        <exception-type>java.lang.Throwable</exception-type>
        <location>/error</location>
    </error-page>

with:

    <error-page>
        <location>/error</location>
    </error-page>

Wrap URL Parameter Conversion/Validation with separate try/catch and send status 400 on error. On GET use:

      response.sendError(HttpServletResponse.SC_BAD_REQUEST);
      return;

On POST often returning JSON (avoid HTML Error page) so use:

      errorReason = "Bad Request";
      response.setStatus(HttpServletResponse.SC_BAD_REQUEST);

Full Changelog: v4.12.2...v4.13.0