bugid:16838 Fixed Sailthru Response to verify error responses, and make ...

...more Pythonic code
I swapped the checking because I expect the common case of the API reporting a proper error rather than the API returning a non valid JSON string.