mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-16 11:50:13 -04:00
Skip processing stats for broken rooms. (#14873)
* Skip processing stats for broken rooms. * Newsfragment * Use a custom exception.
This commit is contained in:
parent
2ec9c58496
commit
82d3efa312
4 changed files with 72 additions and 36 deletions
|
@ -110,6 +110,10 @@ event_fetch_ongoing_gauge = Gauge(
|
|||
)
|
||||
|
||||
|
||||
class InvalidEventError(Exception):
|
||||
"""The event retrieved from the database is invalid and cannot be used."""
|
||||
|
||||
|
||||
@attr.s(slots=True, auto_attribs=True)
|
||||
class EventCacheEntry:
|
||||
event: EventBase
|
||||
|
@ -1310,7 +1314,7 @@ class EventsWorkerStore(SQLBaseStore):
|
|||
# invites, so just accept it for all membership events.
|
||||
#
|
||||
if d["type"] != EventTypes.Member:
|
||||
raise Exception(
|
||||
raise InvalidEventError(
|
||||
"Room %s for event %s is unknown" % (d["room_id"], event_id)
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue