Pārlūkot izejas kodu

HUE-9089 [hive] Add thrift version error message.

Jean-Francois Desjeans Gauthier 6 gadi atpakaļ
vecāks
revīzija
9c90490a34
1 mainītis faili ar 4 papildinājumiem un 1 dzēšanām
  1. 4 1
      desktop/core/src/desktop/lib/thrift_util.py

+ 4 - 1
desktop/core/src/desktop/lib/thrift_util.py

@@ -520,7 +520,10 @@ class SuperClient(object):
               raise
         except Exception as e:
           logging.exception("Thrift saw exception (this may be expected).")
-          raise
+          if "'client_protocol' is unset" in e.message:
+            raise StructuredException('OPEN_SESSION', 'Check if the thrift_version configured is supported. Request failed with "%s"' % str(e), data=None, error_code=502)
+          else:
+            raise
 
       logging.warn("Out of retries for thrift call: " + attr)
       raise