🚨 Error Handling
The ClosedLoop MCP Server provides comprehensive error handling to help you diagnose and resolve issues quickly.Common Error Responses
Invalid API Key
- Verify your API key is correct
- Check if the API key has been revoked
- Generate a new API key from the ClosedLoop dashboard
Missing Required Parameter
- Check that all required parameters are included
- Verify parameter names are spelled correctly
- Refer to the tool documentation for required parameters
Insight Not Found
- Verify the insight ID is correct
- Check if the insight belongs to your team
- Ensure the insight hasn’t been deleted
Rate Limiting
- Wait before making additional requests
- Implement exponential backoff
- Consider caching results to reduce API calls
Invalid Date Format
- Use YYYY-MM-DD format for all dates
- Ensure dates are valid calendar dates
- Check for typos in date strings
Connection Errors
Failed to Connect to MCP Server
Error:Failed to connect to MCP server
Cause: Network connectivity issues or server unavailability.
Solution:
- Check your internet connection
- Verify the server URL is correct
- Check if the MCP server is running
Empty Results
Error: Empty results or no insights found Cause: No insights match your criteria. Solution:- Expand your date range
- Check your filtering parameters
- Verify you have insight data in the system
Error Handling Best Practices
Always Check for Error Responses
Handle Rate Limiting Gracefully
Validate Input Parameters
Log Errors for Debugging
Troubleshooting Guide
Common Issues
-
Authentication Problems
- Verify API key is correctly set in environment variables
- Check API key permissions and team access
- Ensure API key hasn’t expired
-
Network Issues
- Test connectivity to
https://mcp.closedloop.sh - Check firewall settings
- Verify DNS resolution
- Test connectivity to
-
Data Access Issues
- Confirm you have access to the requested data
- Check if insights exist in your team’s data
- Verify date ranges are reasonable
-
Performance Issues
- Monitor rate limit usage
- Implement proper caching
- Use pagination for large datasets
Getting Help
If you continue to experience issues:- Technical Support: support@closedloop.sh
- Health Check: https://mcp.closedloop.sh/health
- Documentation: Check the MCP Tools Reference for detailed parameter information