Catch Service not available exception

Did you try a try/catch on your response variable in the output?

Also take a look at Replacing Http-Connector with Jsoup usage

I found it to be more flexible of a option.