Don't leak information through the query
This commit is contained in:
parent
d9eb99c129
commit
85c6521b07
|
@ -419,7 +419,7 @@ def query_results(
|
||||||
if not results:
|
if not results:
|
||||||
return False
|
return False
|
||||||
if isinstance(results, Exception):
|
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"
|
message_class = "danger"
|
||||||
return {"message": message, "class": message_class}
|
return {"message": message, "class": message_class}
|
||||||
if len(results["hits"]["hits"]) == 0:
|
if len(results["hits"]["hits"]) == 0:
|
||||||
|
|
Loading…
Reference in New Issue