[sqllab] Fix sql lab resolution link (#5216)

* pass link

* update frontend to show link differently

* nits
This commit is contained in:
timifasubaa
2018-06-19 20:33:24 -07:00
committed by GitHub
parent 70679d4c93
commit 93cdf60920
5 changed files with 25 additions and 10 deletions

View File

@@ -152,9 +152,6 @@ def execute_sql(
def handle_error(msg):
"""Local method handling error while processing the SQL"""
troubleshooting_link = config['TROUBLESHOOTING_LINK']
msg = 'Error: {}. You can find common superset errors and their \
resolutions at: {}'.format(msg, troubleshooting_link) \
if troubleshooting_link else msg
query.error_message = msg
query.status = QueryStatus.FAILED
query.tmp_table_name = None
@@ -163,6 +160,8 @@ def execute_sql(
'status': query.status,
'error': msg,
})
if troubleshooting_link:
payload['link'] = troubleshooting_link
return payload
if store_results and not results_backend: