From 71a2589202bbe1564177b58891167716ddc9b835 Mon Sep 17 00:00:00 2001 From: Hannes Lerchl Date: Wed, 15 Jun 2022 14:45:22 +0200 Subject: [PATCH] Added a comment on why there's an extra 'except' block --- synapse/rest/client/login.py | 1 + 1 file changed, 1 insertion(+) diff --git a/synapse/rest/client/login.py b/synapse/rest/client/login.py index f5340a1ee8f5..c3cbea187fe4 100644 --- a/synapse/rest/client/login.py +++ b/synapse/rest/client/login.py @@ -438,6 +438,7 @@ async def _do_jwt_login( claims_options=claim_options, ) except BadSignatureError: + # We handle this case separately to provide a better error message raise LoginError( 403, "JWT validation failed: Signature verification failed",