Skip to content

Catch erroneous response

Compare
Choose a tag to compare
@lukasotocerny lukasotocerny released this 30 Oct 10:20
· 3 commits to master since this release

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.