Retry when api fails

Sometimes the api server gives us an error object instead of a pet with a pic. We can just keep retrying (and log those attempts so we notice if something goes terribly wrong and we're just hitting the server endlessly).