fixed HttpUrlConnection success issue, will now read error stream if
input stream is not available