Troubleshooting Guide
Common issues and how to fix them.
Authentication Errors
Problem: "Invalid API Key"
Symptoms:
AuthenticationError: Invalid API key
Solutions:
-
Check API key is correct:
echo $QWED_API_KEY -
Verify key is active:
- Log into dashboard
- Check API keys page
- Regenerate if needed
-
Check for whitespace:
api_key = os.getenv("QWED_API_KEY").strip()
Verification Failures
Problem: Unexpected Verification Failures
Symptoms:
result.verified == False # But should be True
Debug steps:
-
Enable verbose mode:
client = QWEDClient(api_key="...", verbose=True)
result = client.verify("2+2=4") -
Check trace:
result = client.verify("2+2=4", return_trace=True)
print(json.dumps(result.trace, indent=2)) -
Verify input format:
# Ensure input is well-formed
query = "Calculate 2+2" # Natural language
# Not: "2 + 2" # Might fail
Performance Issues
Problem: Slow Response Times
Symptoms: Response time > 5 seconds
Solutions:
-
Use batch processing:
# ❌ Slow
for q in queries:
result = client.verify(q)
# ✅ Fast
results = client.verify_batch([
BatchItem(query=q) for q in queries
]) -
Increase timeout:
client = QWEDClient(api_key="...", timeout=60) -
Check network latency:
ping api.qwedai.com
Quota Issues
Problem: "Quota Exceeded"
Symptoms:
QuotaExceededError: API quota exceeded
Solutions:
-
Check quota status:
status = client.get_quota_status()
print(f"Used: {status.used}, Remaining: {status.remaining}") -
Upgrade plan:
- Visit https://qwedai.com/pricing
- Contact sales for enterprise
-
Implement rate limiting:
from time import sleep
for query in queries:
result = client.verify(query)
sleep(0.1) # 10 req/sec max
Integration Issues
Problem: Pages Still Showing 404
症 Symptoms: "Page Not Found" on integration pages
Solutions:
-
Use correct URL format:
❌ docs.qwedai.com/integration/getting-started
✅ docs.qwedai.com/docs/integration/getting-started -
Hard refresh:
- Windows: Ctrl + Shift + R
- Mac: Cmd + Shift + R
-
Check deployment:
- Visit https://github.com/QWED-AI/qwed-enterprise/actions
- Verify latest deployment succeeded
Error Code Reference
| Error Code | Meaning | Solution |
|---|---|---|
AUTH_001 | Invalid API key | Check/regenerate key |
AUTH_002 | Expired key | Renew API key |
QUOTA_001 | Quota exceeded | Upgrade plan |
TIMEOUT_001 | Request timeout | Increase timeout |
VALIDATION_001 | Invalid input | Check input format |
Getting Help
Self-Service:
-
Check logs:
import logging
logging.basicConfig(level=logging.DEBUG) -
Run test suite:
python test_qwed_integration.py -
Search documentation:
Community Support:
Enterprise Support:
- 📧 Email: support@qwedai.com
- 💼 Slack Connect (Enterprise customers)
- 📞 Emergency Hotline (Enterprise Pro+)
Debug Checklist
When troubleshooting:
- Check error message carefully
- Enable verbose/debug mode
- Review logs
- Test with simple query
- Check network connectivity
- Verify API key
- Check quota status
- Review recent code changes
- Test in isolation
- Search documentation
Still stuck? Contact support@qwedai.com with:
- Error message
- Code snippet
- Steps to reproduce
- QWED SDK version