[bugfix] Presto KeyError 'errorLocation' (#3291)

This commit is contained in:
Maxime Beauchemin 2017-08-16 13:25:09 -07:00 committed by GitHub
parent 9fcd5d67e4
commit 84e59a11f1
1 changed files with 3 additions and 3 deletions

View File

@ -497,9 +497,9 @@ class PrestoEngineSpec(BaseEngineSpec):
isinstance(e.orig[0], dict)):
error_dict = e.orig[0]
return '{} at {}: {}'.format(
error_dict['errorName'],
error_dict['errorLocation'],
error_dict['message']
error_dict.get('errorName'),
error_dict.get('errorLocation'),
error_dict.get('message'),
)
return utils.error_msg_from_exception(e)