Skip to content

Commit 9ec6f73

Browse files
committed
Assert that base URL is set when next page URL is relative
1 parent 294e68f commit 9ec6f73

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

python-lib/rest_api_client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ def __init__(self, credential, endpoint, custom_key_values={}):
6767
top_key = endpoint.get("top_key")
6868
skip_key = endpoint.get("skip_key")
6969
pagination_type = endpoint.get("pagination_type", "na")
70+
if pagination_type=="next_page" and is_next_page_url_relative and not next_page_url_base:
71+
raise RestAPIClientError("Pagination's 'Next page URL' is relative but no 'Base URL to next page' has been set")
7072
self.pagination.configure_paging(
7173
skip_key=skip_key,
7274
limit_key=top_key,

0 commit comments

Comments
 (0)