Please add some additional text to the this error message used during reponse handling.
The log shows something like
ERROR:atlassian.rest_client:Expecting value: line 1 column 1 (char 0)
which looks rather serious while it isn't.
Instead you could use something like
logging.error('JSON not found, returning text instead')