mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-05 14:04:55 -04:00
Implement MSC3848: Introduce errcodes for specific event sending failures (#13343)
Implements MSC3848
This commit is contained in:
parent
39be5bc550
commit
502f075e96
11 changed files with 144 additions and 36 deletions
|
@ -28,11 +28,11 @@ from synapse.api.constants import (
|
|||
RoomTypes,
|
||||
)
|
||||
from synapse.api.errors import (
|
||||
AuthError,
|
||||
Codes,
|
||||
NotFoundError,
|
||||
StoreError,
|
||||
SynapseError,
|
||||
UnstableSpecAuthError,
|
||||
UnsupportedRoomVersionError,
|
||||
)
|
||||
from synapse.api.ratelimiting import Ratelimiter
|
||||
|
@ -175,10 +175,11 @@ class RoomSummaryHandler:
|
|||
|
||||
# First of all, check that the room is accessible.
|
||||
if not await self._is_local_room_accessible(requested_room_id, requester):
|
||||
raise AuthError(
|
||||
raise UnstableSpecAuthError(
|
||||
403,
|
||||
"User %s not in room %s, and room previews are disabled"
|
||||
% (requester, requested_room_id),
|
||||
errcode=Codes.NOT_JOINED,
|
||||
)
|
||||
|
||||
# If this is continuing a previous session, pull the persisted data.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue