Troubleshooting Overview
Quick Access: Support | Errors | Request Logs
This section provides solutions to common issues you may encounter when using LangMart. Use these guides to quickly diagnose and resolve problems.
Common Issues
Connection Problems
Issues connecting to providers or the LangMart API:
- Invalid API key errors
- Provider connection failures
- Rate limiting issues
- Timeout errors
Troubleshoot Connection Issues
Billing Problems
Issues with credits, payments, and charges:
- Insufficient credits errors
- Payment failures
- Unexpected charges
- Credit balance questions
API Errors
HTTP errors and API-specific issues:
- Authentication errors (401)
- Validation errors (400)
- Model not found (404)
- Gateway unavailable (503)
Quick Diagnostics
Check Your Connection
# Test API connectivity
curl -X GET "https://api.langmart.ai/health"
# Test authentication
curl -X GET "https://api.langmart.ai/api/public/providers" \
-H "Authorization: Bearer YOUR_API_KEY"
# Test a simple completion
curl -X POST "https://api.langmart.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "groq/llama-3.3-70b-versatile", "messages": [{"role": "user", "content": "Hi"}]}'Check Provider Status
- Navigate to Connections in the dashboard
- Look for the connection status indicator
- Click Test to verify connectivity
- Check for any error messages
Check Your Balance
curl -X GET "https://api.langmart.ai/api/account/balance" \
-H "Authorization: Bearer YOUR_API_KEY"View Recent Errors
curl -X GET "https://api.langmart.ai/api/account/errors?limit=10" \
-H "Authorization: Bearer YOUR_API_KEY"Error Code Quick Reference
| Code | Category | Common Cause |
|---|---|---|
| 400 | Client Error | Invalid request format |
| 401 | Authentication | Invalid or missing API key |
| 402 | Payment Required | Insufficient credits |
| 403 | Forbidden | Access denied |
| 404 | Not Found | Model or resource not found |
| 429 | Rate Limited | Too many requests |
| 500 | Server Error | Internal error |
| 502 | Bad Gateway | Provider communication error |
| 503 | Unavailable | Service temporarily unavailable |
| 504 | Timeout | Request timed out |
Getting Help
Self-Service Resources
- Documentation: Browse the docs for detailed guides
- Analytics: Check your request logs for error details
- Status Page: Check system status for outages
Contact Support
If you cannot resolve an issue:
Gather Information:
- Request ID (from error response)
- Timestamp of the error
- Full error message
- Request details (model, endpoint)
Submit a Ticket:
- Navigate to Support in the dashboard
- Describe the issue with gathered information
- Include any relevant screenshots
Response Time:
- Critical issues: 1 hour
- General issues: 24 hours
- Feature requests: 1 week
Preventive Measures
Implement Error Handling
import requests
from time import sleep
def make_request_with_retry(url, headers, data, max_retries=3):
for attempt in range(max_retries):
response = requests.post(url, headers=headers, json=data)
if response.status_code == 200:
return response.json()
if response.status_code == 429: # Rate limited
retry_after = int(response.headers.get('Retry-After', 60))
sleep(retry_after)
continue
if response.status_code >= 500: # Server error
sleep(2 ** attempt) # Exponential backoff
continue
# Client error - don't retry
response.raise_for_status()
raise Exception("Max retries exceeded")Set Up Monitoring
- Enable Alerts: Set up cost and error rate alerts
- Check Logs: Review request logs regularly
- Monitor Trends: Watch for increasing error rates
Keep Credentials Secure
- Never expose API keys in client-side code
- Rotate keys periodically
- Use environment variables
- Monitor for unauthorized usage
Quick Access Links
| Feature | Direct Link |
|---|---|
| Support | https://langmart.ai/support |
| Error Tracking | https://langmart.ai/errors |
| Request Logs | https://langmart.ai/requests |
| Connections | https://langmart.ai/connections |
| Usage & Billing | https://langmart.ai/usage |
| Settings | https://langmart.ai/settings |
| Status | https://langmart.ai/status |
Next Steps
Choose the troubleshooting guide that matches your issue:
- Connection Issues - Network and authentication problems
- Billing Issues - Payment and credit problems
- API Errors - Request and response errors