Skip to content

fix(prod): downgrade elastic client version

Pavel Kuzmenko requested to merge kpn/downgrade_elastic_version into master

version > 7.17.6 cheked X-Elastic-Product header on http responses

https://github.com/elastic/elasticsearch/pull/73434

        # 'X-Elastic-Product: Elasticsearch' should be on every 2XX response.
        if not self._verified_elasticsearch:
            # If the header is set we mark the server as verified.
            if meta.headers.get("x-elastic-product", "") == "Elasticsearch":
                self._verified_elasticsearch = True
            # Otherwise we only raise an error on 2XX responses.
            elif meta.status >= 200 and meta.status < 300:
               raise UnsupportedProductError(
                    message=(
                        "The client noticed that the server is not Elasticsearch "
                        "and we do not support this unknown product"
                    ),
                    meta=meta,
                    body=resp_body,
                )
Edited by Pavel Kuzmenko

Merge request reports