[editor] Avoid 500 error when the previous query handle was missing
@@ -355,8 +355,8 @@ class HS2Api(Api):
if (snippet['type'] == 'hive' and beeswax_conf.CLOSE_QUERIES.get()) or (snippet['type'] == 'impala' and impala_conf.CLOSE_QUERIES.get()):
db = self._get_db(snippet)
- handle = self._get_handle(snippet)
try:
+ handle = self._get_handle(snippet)
db.close_operation(handle)
except Exception, e:
if 'no valid handle' in str(e):
