Commit graph

3 commits

Author SHA1 Message Date
ehhuang
7f4d55f5f7 Restore improved exception handling and update test for specific httpx.HTTPStatusError
- Use httpx.HTTPStatusError for more specific exception catching
- Provide better error message: 'GitHub token validation failed. Please check your token and try again.'
- Update test to expect improved error message and properly mock httpx exceptions
2025-07-08 01:22:42 -07:00
ehhuang
409996695b Fix auth test assertions to match updated error messages
Update test assertions in test_auth.py and test_auth_github.py to expect
"Invalid Authorization header format" instead of "Missing or invalid
Authorization header" to align with the error message changes made in
the auth implementation.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-03 10:26:52 -07:00
Eric Huang
c2d16c713e gh auth
- Change auth config from provider_type + config dict to discriminated union types
- Add GitHub token authentication provider
- Improve auth error messages with provider-specific guidance
- Extract auth datatypes to separate module
- Update tests to use new auth config structure
- Remove unused OAuth2LocalJWTConfig

## Test Plan
- Unit tests pass for all auth providers
- Integration tests verify auth flow works correctly
- GitHub token auth tested with valid/invalid tokens

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-03 10:26:51 -07:00