Make error messages slightly more helpful

pull/28/head
Erik Johnston 2014-12-16 18:41:48 +00:00
parent f76269392b
commit 2d7716d4d0
1 changed files with 5 additions and 5 deletions

View File

@ -163,7 +163,7 @@ class FederationHandler(BaseHandler):
yield self._handle_new_event(e, fetch_missing=False) yield self._handle_new_event(e, fetch_missing=False)
except: except:
logger.exception( logger.exception(
"Failed to parse auth event %s", "Failed to handle auth event %s",
e.event_id, e.event_id,
) )
@ -183,7 +183,7 @@ class FederationHandler(BaseHandler):
yield self._handle_new_event(e) yield self._handle_new_event(e)
except: except:
logger.exception( logger.exception(
"Failed to parse state event %s", "Failed to handle state event %s",
e.event_id, e.event_id,
) )
@ -394,7 +394,7 @@ class FederationHandler(BaseHandler):
yield self._handle_new_event(e, fetch_missing=False) yield self._handle_new_event(e, fetch_missing=False)
except: except:
logger.exception( logger.exception(
"Failed to parse auth event %s", "Failed to handle auth event %s",
e.event_id, e.event_id,
) )
@ -408,7 +408,7 @@ class FederationHandler(BaseHandler):
) )
except: except:
logger.exception( logger.exception(
"Failed to parse state event %s", "Failed to handle state event %s",
e.event_id, e.event_id,
) )
@ -713,7 +713,7 @@ class FederationHandler(BaseHandler):
event.event_id, e_id, known_ids, event.event_id, e_id, known_ids,
) )
# FIXME: How does raising AuthError work with federation? # FIXME: How does raising AuthError work with federation?
raise AuthError(403, "Auth events are stale") raise AuthError(403, "Cannot find auth event")
context.auth_events[(e.type, e.state_key)] = e context.auth_events[(e.type, e.state_key)] = e