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)