Skip to main content

🚨 Overview

This page covers common errors you might encounter when using ClosedLoop AI CLI, along with solutions and troubleshooting steps.

πŸ”‘ Authentication Errors

No API Key Configured

Solution:
# Set your API key
cl config set --api-key your-api-key-here

# Verify configuration
cl config

Invalid API Key

Solution:
  1. Get a new API key from https://app.closedloop.sh
  2. Update your configuration:
    cl config set --api-key your-new-key-here
    

API Key Expired

Solution:
  • Generate a new API key from your dashboard
  • Update the configuration with the new key

πŸ“ Validation Errors

Invalid Website URL

Solution:
# Good - includes protocol
cl team website "https://yourproduct.com"

# Bad - missing protocol
cl team website "yourproduct.com"

Invalid Page Number

Solution:
  • Use page numbers starting from 1
  • Check that the page exists (not beyond available pages)

Content Too Short

Solution:
  • Provide more detailed feedback content
  • Minimum 10 characters required

πŸ” Not Found Errors

Insight Not Found

Solution:
  • Check the insight ID is correct
  • Verify the insight exists in your account
  • Use cl insight to list available insights

Ingest Not Found

Solution:
  • Check the ingest ID is correct
  • Verify the ingest exists in your account
  • Use cl ingest to list available ingests

🌐 Connection Errors

Cannot Connect to Servers

Solution:
  1. Check your internet connection
  2. Verify you can access https://mcp.closedloop.sh
  3. Check if your firewall is blocking the connection
  4. Try again in a few minutes

Timeout Errors

Solution:
  • Check your internet connection speed
  • Try again with a smaller dataset
  • Contact support if the issue persists

⚑ Rate Limiting

Too Many Requests

Solution:
  • Wait a few minutes before trying again
  • Reduce the frequency of your requests
  • Consider using pagination for large datasets

πŸ—‚οΈ File System Errors

Configuration File Error

Solution:
# Check file permissions
ls -la ~/.closedloop/config.json

# Fix permissions if needed
chmod 600 ~/.closedloop/config.json

# Or use environment variable instead
export CLOSEDLOOP_API_KEY="your-api-key-here"

File Not Found

Solution:
  • Check the file path is correct
  • Verify the file exists
  • Use absolute paths if needed

πŸ“Š Error Codes Reference

CodeDescriptionSolution
NO_API_KEYNo API key configuredRun cl config set --api-key <key>
INVALID_API_KEYAPI key is invalidGet new key from https://app.closedloop.sh
VALIDATION_ERRORInvalid parametersCheck input format and requirements
NOT_FOUNDResource not foundCheck ID is correct and exists
RATE_LIMITEDToo many requestsWait and retry
CONNECTION_ERRORCannot connect to serversCheck internet connection
CONFIG_ERRORConfiguration file errorCheck permissions or use environment variable

πŸ› οΈ Troubleshooting Steps

1. Check Configuration

# Verify your configuration
cl config

# Check if API key is set
cl config --json | jq '.data.configured'

2. Test Connection

# Test basic connectivity
ping mcp.closedloop.sh

# Test API connectivity
curl -I https://mcp.closedloop.sh

3. Validate Input

# Check your input format
echo "Your feedback content" | wc -c  # Should be >= 10

# Validate URLs
echo "https://yourproduct.com" | grep -E '^https?://'

4. Check Logs

# Enable verbose output
cl --verbose ingest "your feedback"

# Check for detailed error messages
cl config --json 2>&1 | jq '.'

πŸ†˜ Getting Help

If you’re still experiencing issues:
  1. Check the documentation - Review the specific command pages
  2. Search existing issues - Check GitHub Issues
  3. Contact support - Email support@closedloop.sh with:
    • Error message
    • Command you were running
    • Your CLI version (cl --version)
    • Operating system details

πŸ”„ Common Solutions

Reset Configuration

# Remove configuration file
rm ~/.closedloop/config.json

# Reconfigure from scratch
cl config set --api-key your-api-key-here

Update CLI

# Update to latest version
npm install -g @closedloop-ai/cli@latest

# Verify version
cl --version

Use Environment Variables

# Set API key as environment variable
export CLOSEDLOOP_API_KEY="your-api-key-here"

# Verify it's working
cl config