fix test_auto_create_auto_join_where_no_consent (#4886)

This commit is contained in:
Neil Johnson 2019-03-19 11:38:59 +00:00 committed by Richard van der Hoff
parent e9eeca1314
commit 88f0675967
5 changed files with 39 additions and 5 deletions

View file

@ -23,6 +23,7 @@ from synapse.api.constants import LoginType
from synapse.api.errors import (
AuthError,
Codes,
ConsentNotGivenError,
InvalidCaptchaError,
LimitExceededError,
RegistrationError,
@ -311,6 +312,10 @@ class RegistrationHandler(BaseHandler):
)
else:
yield self._join_user_to_room(fake_requester, r)
except ConsentNotGivenError as e:
# Technically not necessary to pull out this error though
# moving away from bare excepts is a good thing to do.
logger.error("Failed to join new user to %r: %r", r, e)
except Exception as e:
logger.error("Failed to join new user to %r: %r", r, e)