private HttpEntity wrapRequestEntity(HttpEntity httpEntity, boolean clientCompression, boolean useHttpCompression,
                                         boolean appControlledCompression, LZ4Factory lz4Factory) {
        LOG.debug("client compression: {}, http compression: {}", clientCompression, useHttpCompression);

        if (clientCompression && !appControlledCompression) {
            return new LZ4Entity(httpEntity, useHttpCompression, false, true,
                    MapUtils.getInt(chConfiguration, "compression.lz4.uncompressed_buffer_size"), false, lz4Factory);
        } else  {
            return httpEntity;
        }
    }
Reads status line and if error tries to parse response body to get server error message.

@param httpResponse - HTTP response
@return
client-v2/src/main/java/com/clickhouse/client/api/internal/HttpAPIClientHelper.java