                      request.query_params[self.limit_query_param],
                      strict=True,
                      cutoff=self.max_limit
                  )
              except (KeyError, ValueError):
                  pass
  
          return self.default_limit
  
      def get_offset(self, request):
          try:
              return _positive_int(
 
</s> remove             try:
 </s> add             with contextlib.suppress(KeyError, ValueError): </s> remove             try:
 </s> add             with contextlib.suppress(KeyError, ValueError): </s> remove             try:
 </s> add             with contextlib.suppress(KeyError, ValueError): </s> remove             except (KeyError, ValueError):
                pass

 </s> add  </s> remove             except (KeyError, ValueError):
                pass

 </s> add 
                      request.query_params[self.limit_query_param],
                      strict=True,
                      cutoff=self.max_limit
                  )



          return self.default_limit
  
      def get_offset(self, request):
          try:
              return _positive_int(
keep keep keep keep replace replace replace keep keep keep keep keep
 Refactor: Replace try/except with contextlib.suppress() (#8676) 
rest_framework/pagination.py