From 18e0d7364af228c23cbbf9c30ceb2e4c5f9d5415 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 3 Mar 2026 14:19:24 +0000 Subject: [PATCH 1/2] Initial plan From 7a5d914d579e0bb9962a225f0682e9987f1ebf9c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 3 Mar 2026 14:21:50 +0000 Subject: [PATCH 2/2] Fix: use PyJWTError in user.py exception handler; update github_application.py docstrings Co-authored-by: lukaszgryglicki <2469783+lukaszgryglicki@users.noreply.github.com> --- cla-backend/cla/controllers/github_application.py | 5 ++--- cla-backend/cla/user.py | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cla-backend/cla/controllers/github_application.py b/cla-backend/cla/controllers/github_application.py index ff47d8c42..99244a8ad 100644 --- a/cla-backend/cla/controllers/github_application.py +++ b/cla-backend/cla/controllers/github_application.py @@ -76,13 +76,12 @@ def create_check_run(self, repository_name, data): class GithubCLAIntegration(GithubIntegration): """ - Custom GithubIntegration using python-jose instead of pyjwt for token creation. + Custom GithubIntegration using PyJWT for token creation. """ def create_jwt(self): """ - Overloaded to use python-jose instead of pyjwt. - Couldn't get it working with pyjwt. + Overloaded to use PyJWT for token creation. """ now = int(time.time()) payload = { diff --git a/cla-backend/cla/user.py b/cla-backend/cla/user.py index d9075cfdd..f510dff97 100644 --- a/cla-backend/cla/user.py +++ b/cla-backend/cla/user.py @@ -46,7 +46,7 @@ def cla_user(default=None, request=None, **kwargs): 'verify_jti': False, }, ) - except Exception as e: + except PyJWTError as e: cla.log.error('Error parsing Bearer token: {}'.format(e)) return default