Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE] Inconsistent error handling betwee get() and getPaginatedData() for the ZIA module #243

Open
CKroes97 opened this issue Jan 20, 2025 · 0 comments

Comments

@CKroes97
Copy link

Description
The ZIA module, in the function getPaginatedData(), returns the data collected so far when it encounters an unexpected HTTP status code. I would rather see it raise an exception because it is now unclear whether all data is collected, which makes it cumbersome to design the right control flow.

get() instead raises an exception if an unexpected status code is returned.

Reproduction
When running ZIAClientHelper.users.list(), if an error is returned by one of the pages, which seemingly happens randomly at times (we have another ticket open about that), it ends up returning the list gathered so far, instead of throwing an error. It is difficult to extrapolate from the returned list whether it is complete or not. If instead an error were returned it would at least be clear that retrieving the list failed.

Expected behavior
getPaginatedData() raises an exception if the API returns an unexpected value.

Is it a regression?
N.A.

Debug Logs
Can be provided via ticket if need be

Other Information

  • Version: 0.10.3
  • Runs in automated pipeline

Additional context
N.A.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant