mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
Don't mangle exceptions
This commit is contained in:
parent
86ef9760a7
commit
bddfad253a
@ -339,9 +339,7 @@ class RoomKeysVersionServlet(RestServlet):
|
|||||||
)
|
)
|
||||||
except SynapseError as e:
|
except SynapseError as e:
|
||||||
if e.code == 404:
|
if e.code == 404:
|
||||||
e.errcode = Codes.NOT_FOUND
|
raise SynapseError(404, "No backup found", Codes.NOT_FOUND)
|
||||||
e.msg = "No backup found"
|
|
||||||
raise e
|
|
||||||
defer.returnValue((200, info))
|
defer.returnValue((200, info))
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
@ -356,7 +354,7 @@ class RoomKeysVersionServlet(RestServlet):
|
|||||||
{}
|
{}
|
||||||
"""
|
"""
|
||||||
if version is None:
|
if version is None:
|
||||||
raise SynapseError(400, "No version specified to delete")
|
raise SynapseError(400, "No version specified to delete", Codes.NOT_FOUND)
|
||||||
|
|
||||||
requester = yield self.auth.get_user_by_req(request, allow_guest=False)
|
requester = yield self.auth.get_user_by_req(request, allow_guest=False)
|
||||||
user_id = requester.user.to_string()
|
user_id = requester.user.to_string()
|
||||||
|
Loading…
Reference in New Issue
Block a user