Uploaded image for project: 'Spring Data Commons'
  1. Spring Data Commons
  2. DATACMNS-408

Guard against invalid values when resolving pagination and sorting parameters from web requests

    XMLWordPrintable

    Details

      Description

      [example of invalid value]

      • page=-1 (negative numeric)
      • size=a (not numeric)
      • sort= (not specified)
      • sort=,DESC (not specified property of sort target)
      • etc ...

      Current implementation of the PageableHandlerMethodArgumentResolver is occurred IllegalArgumentException, and http response status is returned 500(Internal Server Error) on the default settings of SpringMVC.
      I think a best that http response status is returned 400(Bad Request).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              olivergierke Oliver Drotbohm
              Reporter:
              kazukishimizu Kazuki Shimizu
              Last updater:
              Oliver Drotbohm
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: