mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-01-27 13:57:01 -05:00
SYN-202: Log as WARN the 404 'Presence information not visible' errors instead of as ERROR since they were spamming the logs
This commit is contained in:
parent
6a7e168009
commit
26a041541b
@ -16,7 +16,7 @@
|
|||||||
from twisted.internet import defer
|
from twisted.internet import defer
|
||||||
|
|
||||||
from synapse.api.constants import EventTypes, Membership
|
from synapse.api.constants import EventTypes, Membership
|
||||||
from synapse.api.errors import RoomError
|
from synapse.api.errors import RoomError, SynapseError
|
||||||
from synapse.streams.config import PaginationConfig
|
from synapse.streams.config import PaginationConfig
|
||||||
from synapse.events.utils import serialize_event
|
from synapse.events.utils import serialize_event
|
||||||
from synapse.events.validator import EventValidator
|
from synapse.events.validator import EventValidator
|
||||||
@ -372,10 +372,17 @@ class MessageHandler(BaseHandler):
|
|||||||
as_event=True,
|
as_event=True,
|
||||||
)
|
)
|
||||||
presence.append(member_presence)
|
presence.append(member_presence)
|
||||||
except Exception:
|
except SynapseError as e:
|
||||||
logger.exception(
|
if e.code == 404:
|
||||||
"Failed to get member presence of %r", m.user_id
|
# FIXME: We are doing this as a warn since this gets hit a
|
||||||
)
|
# lot and spams the logs. Why is this happening?
|
||||||
|
logger.warn(
|
||||||
|
"Failed to get member presence of %r", m.user_id
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
logger.exception(
|
||||||
|
"Failed to get member presence of %r", m.user_id
|
||||||
|
)
|
||||||
|
|
||||||
time_now = self.clock.time_msec()
|
time_now = self.clock.time_msec()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user