Common Errors & Solutions
Here are the most common errors you’ll encounter with Posthoot and how to fix them.🔐 Authentication Errors
401 Unauthorized
Problem: Invalid or expired API key
Solution:
- Check your API key is correct
- Ensure the key hasn’t expired
- Verify you’re using the right environment (dev/prod)
403 Forbidden
Problem: Insufficient permissions
Solution:
- Verify your account has the required permissions
- Check if your subscription plan includes this feature
- Contact support if you believe this is an error
⚡ Rate Limiting Errors
429 Too Many Requests
Problem: You’ve hit the rate limit
Solution:
- Check the
X-RateLimit-Remainingheader - Wait for the reset time shown in
X-RateLimit-Reset - Implement exponential backoff in your code
📧 Email Sending Errors
400 Bad Request - Invalid SMTP Configuration
Problem: SMTP settings are incorrect
Solution:
- Verify SMTP host, port, username, password
- Check if your SMTP provider requires SSL/TLS
- Test SMTP connection separately
500 Internal Server Error - Email Delivery Failed
Problem: Email couldn’t be delivered
Solution:
- Check recipient email address is valid
- Verify your SMTP provider is working
- Review email content for spam triggers
- Check your sending reputation
📊 Analytics Errors
404 Not Found - Analytics Data Unavailable
Problem: Requested analytics data doesn’t exist
Solution:
- Ensure the campaign/email ID is correct
- Check if enough time has passed for data collection
- Verify the date range is valid
422 Unprocessable Entity - Invalid Date Range
Problem: Date parameters are invalid
Solution:
- Use ISO 8601 format:
2024-01-01T00:00:00Z - Ensure start date is before end date
- Check date range isn’t too large (max 90 days)
🔧 General API Errors
500 Internal Server Error
Problem: Server-side error
Solution:
- Check our status page
- Retry the request (implement retry logic)
- Contact support if persistent
502 Bad Gateway
Problem: Service temporarily unavailable
Solution:
- Wait a few minutes and retry
- Check if maintenance is scheduled
- Monitor our status page for updates
🛠️ Debugging Tips
Enable Debug Logging
Check Request Format
📞 Still Having Issues?
If none of these solutions work:- Check our logs: Enable debug mode to see detailed error messages
- Review recent changes: Did you recently update your code or configuration?
- Contact support: Include your request ID and error details