diff --git a/doc/queries.md b/doc/queries.md index 140f2596..87e2c5cb 100644 --- a/doc/queries.md +++ b/doc/queries.md @@ -807,7 +807,7 @@ Result: See [Elasticsearch documentation on Cardinality](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-cardinality-aggregation.html) > **Note** -> curenntly does not support nested feilds +> currently does not support nested fields Example: diff --git a/src/components/Utils/queries.js b/src/components/Utils/queries.js index 7c9c9b4b..5f996eb9 100644 --- a/src/components/Utils/queries.js +++ b/src/components/Utils/queries.js @@ -412,12 +412,13 @@ export const askGuppyForTotalCounts = ( }).then((response) => response.json()) .then((response) => { if (response.errors) { - throw new Error(`Error during download ${response.errors}`); + let errMsgs = response.errors.map(e => e.message).join('; ') + throw new Error(`Error during download: ${errMsgs}`); } return response.data._aggregation[type]._totalCount; }) .catch((err) => { - throw new Error(`Error during download ${err}`); + throw new Error(`Error during download: ${err}`); }); };