code: private InputStream getErrorStream() {
          InputStream errorStream = this.connection.getErrorStream();
          if (errorStream != null) {
              final String contentEncoding = this.connection.getContentEncoding();
              if (contentEncoding != null && contentEncoding.equalsIgnoreCase("gzip")) {
                  try {
                      errorStream = new GZIPInputStream(errorStream);
                  } catch (IOException e) {
                      // just return the error stream as is
                  }
              }
          }
  
          return errorStream;
      }
docs: Returns the response error stream, handling the case when it contains gzipped data.
  @return gzip decoded (if needed) error stream or null