auth0 / jupiterone-python-sdk

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

Unauthorized 401 responses throw unnecessary JSONDecodeError #12

Open lmarkscp opened 2 years ago

lmarkscp commented 2 years ago

Description

If the account or token is invalid, an expected response with status_code 401 is returned, but the reponse._content is a string Unauthorized, not the expected string {error: <message>}. Thus line 114 content = json.loads(response._content) in jupiterone/client.py will cause json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Reproduction

Environment

bsmith-auth0 commented 3 months ago

Hi @lmarkscp ,

We will be archiving this repo in favor of the new official JupiterOne Python SDK. If this issue still remains, please open an issue on the new repo.