The sysparm_offset passed by the caller is not used the code always sets params["sysparm_offset"] to 0, so ServiceNow results keep looping the first page data.
Separately, _notify_update's except calls resp.raise_for_status(), but resp is not defined
A few other minor bugs like missing comma and auth handling in notify_update
Steps to reproduce the behavior:
- Trigger _get_incidents so that sysparm_offset > 0. Observe that the same first page of results is returned every time.
- Trigger _notify_update failure branch and a NameError instead of the HTTPError.
Expected behavior
- _query should use the caller's sysparm_offset so pagination works page over page.
- _notify_update failure path should call .raise_for_status() on the response object.
The sysparm_offset passed by the caller is not used the code always sets params["sysparm_offset"] to 0, so ServiceNow results keep looping the first page data.
Separately, _notify_update's except calls resp.raise_for_status(), but resp is not defined
A few other minor bugs like missing comma and auth handling in notify_update
Steps to reproduce the behavior:
Expected behavior