Severity: high | Category: correctness | Phase: P1.7
Problem
A bad/revoked GitHub PAT maps InvalidTokenError to HTTP 401, and pr_v2 propagates GitHub's status verbatim. The web UI's axios interceptor reacts to any 401 with clearToken(); redirect('/login') — so entering an invalid PAT, or a revoked token, logs the user out of CodeFRAME itself.
Evidence
codeframe/ui/routers/github_integrations_v2.py:205, codeframe/ui/routers/pr_v2.py:306
Acceptance criteria
- Upstream-credential failures map to a distinct code (e.g. 400/502
UPSTREAM_AUTH_FAILED), never raw 401 on authenticated routes.
- Optionally the web UI scopes its logout redirect to a specific auth-expiry code.
Dependencies
None
Filed from the SaaS launch-readiness audit. Atomic: one developer, one session. Work order: strictly P0.1 → P3.12 (no forward dependencies).
Severity: high | Category: correctness | Phase: P1.7
Problem
A bad/revoked GitHub PAT maps
InvalidTokenErrorto HTTP 401, andpr_v2propagates GitHub's status verbatim. The web UI's axios interceptor reacts to any 401 withclearToken(); redirect('/login')— so entering an invalid PAT, or a revoked token, logs the user out of CodeFRAME itself.Evidence
codeframe/ui/routers/github_integrations_v2.py:205,codeframe/ui/routers/pr_v2.py:306Acceptance criteria
UPSTREAM_AUTH_FAILED), never raw 401 on authenticated routes.Dependencies
None
Filed from the SaaS launch-readiness audit. Atomic: one developer, one session. Work order: strictly P0.1 → P3.12 (no forward dependencies).