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

Raised exception in iter_job_results() prevents API errors from returning #156

Closed
sserrata opened this issue Apr 15, 2020 · 0 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@sserrata
Copy link
Member

Describe the bug

The following line in iter_job_results() method prevents API errors from being properly returned:

https://github.com/PaloAltoNetworks/pan-cortex-data-lake-python/blob/master/pan_cortex_data_lake/query.py#L239

Expected behavior

Like successful responses, failed/error responses from the API should be passed to the client.

Current behavior

In iter_job_results(), failed API responses are not returned to the client due to the raised exception.

Possible solution

Refrain from raising an exception for non HTTP status 200 responses.

Steps to reproduce

Screenshots

Context

Your Environment

  • Version used: alpha11
  • Environment name and version (e.g. Chrome 59, node.js 5.4, python 3.7.3): python 3.7.7
  • Operating System and version (desktop or mobile): Mac OSX
  • Link to your project:
@sserrata sserrata added the bug Something isn't working label Apr 15, 2020
@sserrata sserrata self-assigned this Apr 15, 2020
@sserrata sserrata mentioned this issue Apr 15, 2020
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant