From f64211587265a9358a7e1fa38ccbc03f4ea62872 Mon Sep 17 00:00:00 2001 From: Emanuele Panzeri Date: Fri, 19 Jul 2024 14:12:51 +0200 Subject: [PATCH] Elasticsearch: use correct exception text for hits aggregation --- packages/elasticsearch-plugin/src/elasticsearch.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/elasticsearch-plugin/src/elasticsearch.service.ts b/packages/elasticsearch-plugin/src/elasticsearch.service.ts index c2af3a4f3d..cea750f084 100644 --- a/packages/elasticsearch-plugin/src/elasticsearch.service.ts +++ b/packages/elasticsearch-plugin/src/elasticsearch.service.ts @@ -274,7 +274,7 @@ export class ElasticsearchService implements OnModuleInit, OnModuleDestroy { const { aggregations } = body; if (!aggregations) { throw new InternalServerError( - 'An error occurred when querying Elasticsearch for priceRange aggregations', + 'An error occurred when querying Elasticsearch for total hits aggregation', ); } return aggregations.total ? aggregations.total.value : 0;