auth0 / jupiterone-python-sdk

A Python client for jupiterone.io
MIT License
10 stars 17 forks source link

Improved Error Handling #15

Closed VDubber closed 1 year ago

VDubber commented 1 year ago

By submitting a PR to this repository, you agree to the terms within the Auth0 Code of Conduct. Please see the contributing guidelines for how to create and submit a high-quality PR for this repo.

Description

Changes improve the error handling of requests being sent to JupiterOne. Prior to these changes, if a 401 was the response code, the call to json.loads failed because the body does not contain JSON. This was hiding the real error from the user.

Testing

To test, call J1 with the client using an invalid token.

Checklist

VDubber commented 1 year ago

Duplicate PR