Skip to content

Commit

Permalink
Fix more dredd tests
Browse files Browse the repository at this point in the history
  • Loading branch information
medariox committed Dec 2, 2018
1 parent 718c647 commit b291939
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions medusa/server/api/v2/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,11 @@ def _get_limit(self, default=20, maximum=10000):
self._raise_bad_request_error('Invalid limit parameter')

def _paginate(self, data=None, data_generator=None, sort=None):
arg_page = self._get_page()
arg_limit = self._get_limit()
try:
arg_page = self._get_page()
arg_limit = self._get_limit()
except HTTPError as error:
return self._bad_request(error.message)

headers = {
'X-Pagination-Page': arg_page,
Expand Down

0 comments on commit b291939

Please sign in to comment.