How to handle a failed RESTful sensor API call

I abandoned this approach and wrote a Node-RED node for doing this. There are also a couple of Appdaemon solutions here as well.