소스 검색

HUE-4019 [impala] Do not blank error on query with good syntax but invalid query

Romain Rigaux 9 년 전
부모
커밋
0a68343
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      desktop/libs/notebook/src/notebook/connectors/base.py
  2. 1 1
      desktop/libs/notebook/src/notebook/connectors/hiveserver2.py

+ 1 - 1
desktop/libs/notebook/src/notebook/connectors/base.py

@@ -40,7 +40,7 @@ class AuthenticationRequired(Exception):
 
 class QueryError(Exception):
   def __init__(self, message, handle=None):
-    self.message = message
+    self.message = message or _('No error message, please check the logs.')
     self.handle = handle
     self.extra = {}
 

+ 1 - 1
desktop/libs/notebook/src/notebook/connectors/hiveserver2.py

@@ -231,7 +231,7 @@ class HS2Api(Api):
     status = HiveServerQueryHistory.STATE_MAP[operation.operationState]
 
     if status.index in (QueryHistory.STATE.failed.index, QueryHistory.STATE.expired.index):
-      if 'transition from CANCELED to ERROR' in operation.errorMessage: # Hive case on canceled query
+      if operation.errorMessage and 'transition from CANCELED to ERROR' in operation.errorMessage: # Hive case on canceled query
         raise QueryExpired()
       else:
         raise QueryError(operation.errorMessage)