Commit 6e1b200
committed
fix: narrow exception handling in get_github_app_installation_token
## What/Why
Narrow except clause from bare Exception to GithubException so that
misconfiguration errors (bad int() cast, JWT construction failures)
propagate instead of silently returning None and causing confusing 401s
downstream. Addresses PR review feedback from @zkoppert.
## Proof it works
All 14 tests in test_auth.py pass. Updated the request_failure test to
raise GithubException instead of bare Exception to match the narrowed
catch. Pylint clean (no new warnings).
## Risk + AI role
Low. AI-generated (Claude Opus 4.6) with human review.
## Review focus
Whether GithubException covers all the API/network error cases we want
to catch, or if additional specific exceptions should be included.
Signed-off-by: jmeridth <jmeridth@gmail.com>1 parent a6cba0b commit 6e1b200
2 files changed
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
262 | 263 | | |
263 | 264 | | |
264 | 265 | | |
265 | | - | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
266 | 269 | | |
267 | 270 | | |
268 | 271 | | |
| |||
0 commit comments