Sqllab error troubleshooting (#3680)

* provide troubleshooting link

* add option to append error troubleshooting link beneath sqllab error
This commit is contained in:
timifasubaa
2017-10-16 16:30:08 -07:00
committed by Maxime Beauchemin
parent d0b5b449b2
commit d4d4a9b1f1
2 changed files with 8 additions and 0 deletions

View File

@@ -118,6 +118,10 @@ 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