Don't completely die if get auth_chain or querying auth_chain requests fail

This commit is contained in:
Erik Johnston 2015-02-03 13:57:54 +00:00
parent 77a076bd25
commit 6efd4d1649

View File

@ -787,6 +787,7 @@ class FederationHandler(BaseHandler):
if missing_auth:
logger.debug("Missing auth: %s", missing_auth)
# If we don't have all the auth events, we need to get them.
try:
remote_auth_chain = yield self.replication_layer.get_event_auth(
origin, event.room_id, event.event_id
)
@ -822,6 +823,9 @@ class FederationHandler(BaseHandler):
auth_events[(e.type, e.state_key)] = e
except AuthError:
pass
except:
# FIXME:
logger.exception("Failed to get auth chain")
# FIXME: Assumes we have and stored all the state for all the
# prev_events
@ -836,6 +840,7 @@ class FederationHandler(BaseHandler):
auth_ids = self.auth.compute_auth_events(event, context)
local_auth_chain = yield self.store.get_auth_chain(auth_ids)
try:
# 2. Get remote difference.
result = yield self.replication_layer.query_auth(
origin,
@ -878,6 +883,10 @@ class FederationHandler(BaseHandler):
except AuthError:
pass
except:
# FIXME:
logger.exception("Failed to query auth chain")
# 4. Look at rejects and their proofs.
# TODO.