Common ErrorsΒΆ
Quick reference for troubleshooting common API errors.
Authentication ErrorsΒΆ
401 Unauthorized - Missing API KeyΒΆ
Error:
Cause: No X-API-Key header provided
Solution:
# β
Correct
curl -H "X-API-Key: your-key" https://api.reputeapi.com/api/v1/check?domain=example.com
# β Wrong
curl https://api.reputeapi.com/api/v1/check?domain=example.com
401 Unauthorized - Invalid API KeyΒΆ
Error:
Causes: - API key is incorrect - API key was revoked - API key expired
Solution: 1. Verify your API key at reputeapi.com/dashboard 2. Generate a new API key if needed 3. Update your environment variables
Rate Limiting ErrorsΒΆ
429 Too Many RequestsΒΆ
Error:
Solution:
- Wait for the time specified in retry_after (seconds)
- Implement exponential backoff
- Use caching to reduce requests
- Upgrade your plan for higher limits
See Rate Limits for details.
Validation ErrorsΒΆ
400 Bad Request - Invalid DomainΒΆ
Error:
{
"error": "Invalid domain",
"message": "The domain 'example' is not valid",
"code": "INVALID_DOMAIN"
}
Common causes:
# β Missing TLD
check_domain("example")
# β Invalid characters
check_domain("exam ple.com")
# β Protocol included
check_domain("https://example.com")
# β
Correct
check_domain("example.com")
400 Bad Request - Invalid DKIM SelectorΒΆ
Error:
Solution:
# β Invalid characters
selectors = ["default!", "google@"]
# β
Valid selectors
selectors = ["default", "google", "s1"]
DNS Resolution ErrorsΒΆ
404 Not Found - Domain Not FoundΒΆ
Error:
Causes: - Domain doesn't exist - Domain has no DNS records - Typo in domain name
Solution:
# Verify domain exists
nslookup example.com
# Check for typos
# β exampel.com (typo)
# β
example.com
504 Gateway Timeout - DNS TimeoutΒΆ
Error:
Causes: - DNS servers are slow/unresponsive - Network connectivity issues - Domain's nameservers are down
Solution:
- Retry the request
- Check domain's nameservers: dig +trace example.com
- Verify domain resolves: dig example.com
Server ErrorsΒΆ
500 Internal Server ErrorΒΆ
Error:
Solution: - Retry the request (may be temporary) - Check status page - Contact support if persists
503 Service UnavailableΒΆ
Error:
Causes: - Scheduled maintenance - Temporary overload - System upgrade in progress
Solution: - Wait a few minutes and retry - Check status page - Implement retry logic with backoff
Content Type ErrorsΒΆ
415 Unsupported Media TypeΒΆ
Error:
Solution:
# β
Correct
requests.post(
url,
json={"domain": "example.com"}, # Automatically sets Content-Type
headers={"X-API-Key": API_KEY}
)
# Or explicitly:
requests.post(
url,
data='{"domain": "example.com"}',
headers={
"X-API-Key": API_KEY,
"Content-Type": "application/json"
}
)
Debugging ChecklistΒΆ
When encountering errors:
- Check HTTP Status Code
- 4xx = Client error (check your request)
-
5xx = Server error (retry or contact support)
-
Read Error Message
- Contains specific details about the issue
-
Look for the
codefield for error type -
Verify API Key
-
Check Request Format
-
Test with Known-Good Domain
-
Check Rate Limits
Getting HelpΒΆ
Still stuck? We're here to help:
- Documentation: docs.reputeapi.com
- Support: support@reputeapi.com
- Status Page: status.reputeapi.com
- GitHub Issues: github.com/gorillatechrepo/dkim-api/issues
Next StepsΒΆ
- API Reference - Full API documentation
- Rate Limits - Understand rate limiting
- Best Practices - Optimize usage