code: def _handle_bad_rest_arguments(self, controller, remainder, request):
          
          argspec = self._get_args_for_controller(controller)
          fixed_args = len(argspec) - len(
              request.pecan.get('routing_args', [])
          )
          if len(remainder) < fixed_args:
              # For controllers that are missing intermediate IDs
              # (e.g., /authors/books vs /authors/1/books), return a 404 for an
              # invalid path.
              abort(404)
docs: Ensure that the argspec for a discovered controller actually matched
          the positional arguments in the request path.  If not, raise
          a webob.exc.HTTPBadRequest.