devopshq / artifactory

dohq-artifactory: a Python client for Artifactory
https://devopshq.github.io/artifactory/
MIT License
273 stars 144 forks source link

Handle requests.exceptions.JSONDecodeError #416

Closed Stealthii closed 1 year ago

Stealthii commented 1 year ago

In requests v2.27.0, requests.exceptions.JSONDecodeError was added to decrease inconsistencies in the library.

This PR adds handling of this exception to maintain compatibility with versions prior to, and after this change.

Fixes #414.

allburov commented 1 year ago

LGTM, but CI doesn't work, weird errors tho

beliaev-maksim commented 1 year ago

@allburov @Stealthii this is due to the latest major version update of urllib3

basically, if you supply header with content length and content length does not match actual length, then it fails with the error