code: public static String getErrorResponse(HttpURLConnection connection, boolean isZipped) throws IOException {
  		if (connection != null) {
  			InputStream is = null;
  			try {
  				is = connection.getErrorStream();
  				if (is != null) {
  					if (isZipped) {
  						is = new GZIPInputStream(is);
  					}
  				}
  				return Util.readStringFromInputStream(is, "UTF-8");
  			} finally {
  				Util.ensureClosed(is);
  			}
  		}
  		return null;
  	}
docs: Reads error response and returns it as a string. Handles gzipped streams.
  
  @param connection Current connection
  @return Error response as String
  @throws IOException