You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/11/20 11:19:58 UTC

[GitHub] [airflow] ashb commented on a change in pull request #12495: Show Generic Error for Charts & Query View in old UI

ashb commented on a change in pull request #12495:
URL: https://github.com/apache/airflow/pull/12495#discussion_r527625107



##########
File path: airflow/www/views.py
##########
@@ -471,8 +471,8 @@ def chart_data(self):
             df = hook.get_pandas_df(
                 wwwutils.limit_sql(sql, CHART_LIMIT, conn_type=db.conn_type))
             df = df.fillna(0)
-        except Exception as e:
-            payload['error'] += "SQL execution failed. Details: " + str(e)
+        except Exception:
+            payload['error'] += "SQL execution failed. Contact your System Administrator for more details"

Review comment:
       We probably want to log this error, otherwise there's no info for the sysadmin to get :)
   
   ```suggestion
           except Exception:
               self.log.exception("Chart SQL execution failed")
               payload['error'] += "SQL execution failed. Contact your System Administrator for more details"
   ```
   
   Ditto for other change.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org