Skip to content

Commit

Permalink
Merge pull request #1478 from someones/es_test_connection
Browse files Browse the repository at this point in the history
[ElasticSearch] Fix: connection test was always succesfful
  • Loading branch information
arikfr authored Dec 21, 2016
2 parents 9d579dc + ae5b6fb commit 513d74a
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 513d74a

Please sign in to comment.