Added better error handling for if there is no response

We had some failures with our IFTTT shim where the connection to the API
would fail, causing the app to crash because 'response' was undefined.
This would fix cases like that.