diff --git a/core/lib/opensearch.py b/core/lib/opensearch.py index 55b60c3..ff8a316 100644 --- a/core/lib/opensearch.py +++ b/core/lib/opensearch.py @@ -419,7 +419,7 @@ def query_results( if not results: return False if isinstance(results, Exception): - message = results.info["error"]["root_cause"][0]["reason"] + message = f"Error: {results.info['error']['root_cause'][0]['type']}" message_class = "danger" return {"message": message, "class": message_class} if len(results["hits"]["hits"]) == 0: