0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-25 10:44:16 +01:00

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