Please UseCodeTags. I've added them for you this time. You've been around here long enough that you should know how to use them by now. Code that is difficult to read just discourages people from helping you.
"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." -- Ted Nelson
First check the http response code using httpConnection.getResponseCode() before trying to access the message.
In case of failure response, you have to read the response from httpConnection.getErrorStream().