Remove redundant exception log in /events

This commit is contained in:
Erik Johnston 2016-06-09 10:57:11 +01:00
parent b7fbc9bd95
commit 95f305c35a
1 changed files with 19 additions and 22 deletions

View File

@ -45,30 +45,27 @@ class EventStreamRestServlet(ClientV1RestServlet):
raise SynapseError(400, "Guest users must specify room_id param") raise SynapseError(400, "Guest users must specify room_id param")
if "room_id" in request.args: if "room_id" in request.args:
room_id = request.args["room_id"][0] room_id = request.args["room_id"][0]
try:
handler = self.handlers.event_stream_handler
pagin_config = PaginationConfig.from_request(request)
timeout = EventStreamRestServlet.DEFAULT_LONGPOLL_TIME_MS
if "timeout" in request.args:
try:
timeout = int(request.args["timeout"][0])
except ValueError:
raise SynapseError(400, "timeout must be in milliseconds.")
as_client_event = "raw" not in request.args handler = self.handlers.event_stream_handler
pagin_config = PaginationConfig.from_request(request)
timeout = EventStreamRestServlet.DEFAULT_LONGPOLL_TIME_MS
if "timeout" in request.args:
try:
timeout = int(request.args["timeout"][0])
except ValueError:
raise SynapseError(400, "timeout must be in milliseconds.")
chunk = yield handler.get_stream( as_client_event = "raw" not in request.args
requester.user.to_string(),
pagin_config, chunk = yield handler.get_stream(
timeout=timeout, requester.user.to_string(),
as_client_event=as_client_event, pagin_config,
affect_presence=(not is_guest), timeout=timeout,
room_id=room_id, as_client_event=as_client_event,
is_guest=is_guest, affect_presence=(not is_guest),
) room_id=room_id,
except: is_guest=is_guest,
logger.exception("Event stream failed") )
raise
defer.returnValue((200, chunk)) defer.returnValue((200, chunk))