diff --git a/portal/timeout_lock.py b/portal/timeout_lock.py index 75f91a6a3..87cc611db 100644 --- a/portal/timeout_lock.py +++ b/portal/timeout_lock.py @@ -62,12 +62,8 @@ def __exit__(self, exc_type, exc_value, traceback): # To avoid interrupting iterative lock use, return truthy # value to stop exception propagation - see PEP if exc_type is not None: - error_message = f"{exc_type}" - if exc_value: - error_message += f": {exc_value}" - if traceback: - error_message += f"; {traceback}" - current_app.logger.error(error_message) + current_app.logger.exception( + "TimeoutLock trapped exception:", exc_info=True) return True def is_locked(self):