Don't leak information through the query

This commit is contained in:
Mark Veidemanis 2022-08-16 22:17:30 +01:00
parent d9eb99c129
commit 85c6521b07
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
1 changed files with 1 additions and 1 deletions

View File

@ -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: