This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push:
new e02d35e Add support of another DatabaseError format (#4019)
e02d35e is described below
commit e02d35ed5c4b790e6a50cd24aaf2605984a884ae
Author: Dmitry Goryunov <[email protected]>
AuthorDate: Thu Dec 7 06:49:03 2017 +0100
Add support of another DatabaseError format (#4019)
---
superset/db_engine_specs.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/superset/db_engine_specs.py b/superset/db_engine_specs.py
index 51fa055..6700105 100644
--- a/superset/db_engine_specs.py
+++ b/superset/db_engine_specs.py
@@ -615,6 +615,13 @@ class PrestoEngineSpec(BaseEngineSpec):
error_dict.get('errorLocation'),
error_dict.get('message'),
)
+ if (
+ type(e).__name__ == 'DatabaseError' and
+ hasattr(e, 'args') and
+ len(e.args) > 0
+ ):
+ error_dict = e.args[0]
+ return error_dict.get('message')
return utils.error_msg_from_exception(e)
@classmethod
--
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].