Skip to content

Commit c150466

Browse files
committed
incorp code from PR197 to catch when start index is greater than configured MAX_ITEMS value
1 parent 7f1e550 commit c150466

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pyral/restapi.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -803,6 +803,8 @@ def _buildRequest(self, entity, fetch, query, order, kwargs):
803803
usi = int(kwargs['start']) # usi - user supplied start index
804804
if 0 < usi < MAX_ITEMS: # start index must be greater than 0 and less than max
805805
startIndex = usi
806+
else:
807+
raise ValueError('Provided start index is greater than pyral MAX_ITEMS configured value.')
806808
except ValueError as ex:
807809
pass
808810

0 commit comments

Comments
 (0)