diff --git a/trakt/core.py b/trakt/core.py index 22009686..aa8030a4 100644 --- a/trakt/core.py +++ b/trakt/core.py @@ -534,10 +534,7 @@ def _handle_request(self, method, url, data=None): try: json_data = json.loads(response.content.decode('UTF-8', 'ignore')) except JSONDecodeError as e: - ex = errors.BadResponseException(response) - ex.details = f"Unable to parse JSON: {e}" - - raise ex + raise errors.BadResponseException(response, f"Unable to parse JSON: {e}") return json_data