sba-scouting/TROUBLESHOOTING.md
Cal Corum 7afe4a5f55 Fix TUI corruption from logging and improve sync error handling
- Redirect all logging to data/logs/sba_scout.log instead of stderr
- Prevents log output from corrupting the Textual TUI display
- Add loading spinner for sync operations to show progress
- Improve error messages for Cloudflare/API errors
- Add TROUBLESHOOTING.md guide for common sync issues
- Exclude data/ directory from git

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-10 16:18:57 -06:00

64 lines
1.6 KiB
Markdown

# Troubleshooting Guide
## Sync Errors
### API Key Configuration
The app requires a valid API key to sync data from the SBA Major Domo API.
**Option 1: Settings Screen (Recommended)**
1. Launch the app: `sba-scout`
2. Press `x` to open Settings
3. Enter your API key
4. Click "Save Settings"
**Option 2: Edit settings.yaml directly**
1. Edit `data/settings.yaml`
2. Set `api.api_key` to your actual API key
3. Save the file
4. Restart the app
### Viewing Logs
All errors are now logged to `data/logs/sba_scout.log` instead of the terminal.
To view recent errors:
```bash
tail -f data/logs/sba_scout.log
```
To search for specific errors:
```bash
grep "ERROR" data/logs/sba_scout.log
```
### Common Errors
**"API key not configured"**
- Your API key is missing or set to the placeholder value
- Fix: Configure your API key using one of the methods above
**"Sync failed: Invalid API key"** (401/403 error)
- Your API key is invalid or expired
- Fix: Get a new API key from the SBA Major Domo system
**"Sync failed: API error 500"**
- The API server is experiencing issues
- Fix: Wait a few minutes and try again
**"Request failed: Connection timeout"**
- Network connectivity issues
- Fix: Check your internet connection, or increase timeout in settings
## Getting an API Key
To get an API key for the SBA Major Domo API:
1. Visit the SBA Major Domo system
2. Go to your account settings
3. Generate a new API key
4. Copy the key and paste it into the app settings
## Need More Help?
Check the full logs at `data/logs/sba_scout.log` for detailed error messages and stack traces.