Skip to content

[🐛 Bug]: ServiceNow pagination loops with page 1 data and incorrect exception handling in notify_update #6723

Description

@Veydop

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:

  1. Trigger _get_incidents so that sysparm_offset > 0. Observe that the same first page of results is returned every time.
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions