diff --git a/fyle/platform/internals/decorators.py b/fyle/platform/internals/decorators.py index 396a179..04bf67c 100644 --- a/fyle/platform/internals/decorators.py +++ b/fyle/platform/internals/decorators.py @@ -24,12 +24,12 @@ def new_fn(*args, **kwargs): while attempt < n: try: return func(*args, **kwargs) - except exceptions: - if exc.InvalidTokenError in exceptions: + except exceptions as e: + if isinstance(e, exc.InvalidTokenError): Auth().update_access_token() time.sleep(backoff) attempt += 1 - raise exc.RetryException('failed to execute %s despite retrying' % func) + raise exc.RetryException('failed to execute %s despite retrying' % func.__name__) return new_fn diff --git a/setup.py b/setup.py index d202154..858b91e 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name='fyle', - version='v0.33.0', + version='v0.33.1', author='Siva Narayanan', author_email='siva@fyle.in', description='Python SDK for accessing Fyle Platform APIs',