diff --git a/tailbone/tweens.py b/tailbone/tweens.py index 0684d3fa..f944a66f 100644 --- a/tailbone/tweens.py +++ b/tailbone/tweens.py @@ -27,7 +27,7 @@ Tween Factories from __future__ import unicode_literals, absolute_import import six -from sqlalchemy.exc import OperationalError, InvalidRequestError +from sqlalchemy.exc import OperationalError def sqlerror_tween_factory(handler, registry): @@ -56,7 +56,7 @@ def sqlerror_tween_factory(handler, registry): try: response = handler(request) - except (OperationalError, InvalidRequestError) as error: + except OperationalError as error: # if connection is invalid, allow retry if error.connection_invalidated: