Catch erroneous response
Currently, the SDK was applying
result = json.loads(response.text)
without catching any errors. Exponea sometimes returns a non-JSON format response which causes this to crash.
I've added logging the response from Exponea and raising APIException
.