Replace 5 bare except clauses with 'except Exception:' to improve
error handling and prevent catching system exits and keyboard interrupts:
- gui.py:155 - Queue event processing
- setup_wizard.py:184 - API response parsing
- test_credentials.py:213 - Response JSON parsing
- test_credentials.py:240 - Error response parsing
- test_credentials.py:257 - Response text formatting
This change improves code quality and follows Python best practices
for exception handling.
This commit adds robust diagnostic tools to help users identify and fix
authentication issues with Twitch OAuth and Perplexity API.
New Features:
- test_credentials.py: Comprehensive credential validator with detailed diagnostics
- Tests Twitch OAuth token with IRC authentication
- Validates Perplexity API key and model access
- Provides specific error messages and actionable fixes
- Automatically tests fallback models (sonar-pro → sonar)
- TROUBLESHOOTING.md: Complete troubleshooting guide
- Common error messages and solutions
- Step-by-step diagnostic procedures
- Quick reference for file locations and commands
Improvements to setup_wizard.py:
- Enhanced Twitch token validation with detailed error messages
- Added Perplexity model fallback (sonar-pro → sonar)
- Better error handling with specific solutions
- Recommends working model if primary model unavailable
Documentation Updates:
- README.md: Added credential testing section with examples
- CLAUDE.md: Updated with new tools and testing procedures
- Comprehensive troubleshooting section in README
This addresses the common authentication failures users encounter during
initial setup and provides clear paths to resolution.