ruff format stripped parentheses from except (jwt.InvalidTokenError, PyJWKClientError):, turning it into Python 2 comma syntax (except A, B:) which only catches InvalidTokenError and binds it to the name PyJWKClientError
PyJWKSetError (raised when JWKS returns empty keys) was never caught, causing the 500 to persist even after #80
Fixed by using separate except clauses that ruff won't mangle
Test plan
docker compose up --build and verify POST /api/v1/runs works with authentication
## Summary
- `ruff format` stripped parentheses from `except (jwt.InvalidTokenError, PyJWKClientError):`, turning it into Python 2 comma syntax (`except A, B:`) which only catches `InvalidTokenError` and binds it to the name `PyJWKClientError`
- `PyJWKSetError` (raised when JWKS returns empty keys) was never caught, causing the 500 to persist even after #80
- Fixed by using separate `except` clauses that ruff won't mangle
## Test plan
- [ ] `docker compose up --build` and verify `POST /api/v1/runs` works with authentication
ruff format strips parentheses from `except (A, B):`, turning it into
Python 2 comma syntax that only catches the first exception. Use
separate except clauses so PyJWKClientError is actually caught.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
TheFurya
merged commit 94cc74c0fb into develop2026-03-22 09:53:48 +01:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
ruff formatstripped parentheses fromexcept (jwt.InvalidTokenError, PyJWKClientError):, turning it into Python 2 comma syntax (except A, B:) which only catchesInvalidTokenErrorand binds it to the namePyJWKClientErrorPyJWKSetError(raised when JWKS returns empty keys) was never caught, causing the 500 to persist even after #80exceptclauses that ruff won't mangleTest plan
docker compose up --buildand verifyPOST /api/v1/runsworks with authentication