mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
Show correct error when logging out and access token is missing
Signed-off-by: Aaron Raimist <aaron@raim.ist>
This commit is contained in:
parent
dd64b9dbdd
commit
56f07d980a
@ -40,11 +40,11 @@ class LogoutRestServlet(ClientV1RestServlet):
|
||||
def on_POST(self, request):
|
||||
try:
|
||||
requester = yield self.auth.get_user_by_req(request)
|
||||
except AuthError:
|
||||
except AuthError as e:
|
||||
# this implies the access token has already been deleted.
|
||||
defer.returnValue((401, {
|
||||
"errcode": "M_UNKNOWN_TOKEN",
|
||||
"error": "Access Token unknown or expired"
|
||||
defer.returnValue((e.code, {
|
||||
"errcode": e.errcode,
|
||||
"error": e.msg
|
||||
}))
|
||||
else:
|
||||
if requester.device_id is None:
|
||||
|
Loading…
Reference in New Issue
Block a user