in pyqldb/errors/__init__.py [0:0]
def is_invalid_session_exception(e):
"""
Is the exception an InvalidSessionException?
:type e: :py:class:`builtins.Exception`
:param e: The Exception caught.
:rtype: bool
:return: True if the exception is an InvalidSessionException. False otherwise.
"""
if isinstance(e, ClientError):
is_invalid_session = e.response['Error']['Code'] == 'InvalidSessionException'
return is_invalid_session
return False