Skip to content

Commit

Permalink
Fix ES test connection
Browse files Browse the repository at this point in the history
Error was being created, but not returned. Which caused it
to always display as success.
  • Loading branch information
adamlwgriffiths committed Dec 21, 2016
1 parent 9d579dc commit ae5b6fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions redash/query_runner/elasticsearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,10 @@ def test_connection(self):
r.raise_for_status()
except requests.HTTPError as e:
logger.exception(e)
error = "Failed to execute query. Return Code: {0} Reason: {1}".format(r.status_code, r.text)
raise Exception("Failed to execute query. Return Code: {0} Reason: {1}".format(r.status_code, r.text))
except requests.exceptions.RequestException as e:
logger.exception(e)
error = "Connection refused"
raise Exception("Connection refused")


class Kibana(BaseElasticSearch):
Expand Down

0 comments on commit ae5b6fb

Please sign in to comment.