title: Django PageNumberPagination customize error if page number out of range
body: <p>I'm currently trying to create an API that return list of objects with page and limit per page input from url parameter using django-rest-framework which i already done in my api view with custom Pagination</p>
  
  <pre><code>class PropertyListPagination(PageNumberPagination):
      page_size = 20
      page_size_query_param = 'page_size'
  
      def get_paginated_response(self, data):
          return Response({
              'code': 200,
              'data': data
          })
  
  @api_view(['GET'])
  def property_list(request):
      if request.method == 'GET':
          paginator = PropertyListPagination()
          queryset = Property.objects.all()
          context = paginator.paginate_queryset(queryset, request)
          serializer = PropertySerializer(context, many=True)
          return paginator.get_paginated_response(serializer.data)
  </code></pre>
  
  <p>Currently if a page is out of range( for example if i have only 2 object and i set my url to page=3 and page_size=1 then it should out of range of total objects) then in the response it will return a 404 status and in the body:</p>
  
  <pre><code>{
      "detail": "Invalid page."
  }
  </code></pre>
  
  <p>Is there a way to customize for it to return 400 status and the following json body ?</p>
  
  <pre><code>{
      "code": 400,
      "error": "Page out of range"
  }
  </code></pre>
  
  <p>Thank you</p>