Testing and Debugging

Test your custom actions before deploying them to production

Testing and Debugging

💡
Custom actions require a Pro plan or higher. Upgrade to Pro →

Built-in Request Tester

Test your actions directly in the configuration interface.

1. Configure Your Action

Set up your URL, method, and parameters as usual.

2. Open Test Panel

The test panel shows:

  • Resolved URL with variables
  • Headers with substitutions
  • Body data structure
  • Query parameters

3. Provide Test Values

For AI-generated parameters, enter test values:

{
  "searchQuery": "customer support",
  "limit": 10,
  "includeArchived": false
}

4. Execute Test

Click Test Request to:

  • Send actual HTTP request
  • View response status
  • Inspect response body
  • Check response time

5. Review Results

{
  "status": 200,
  "response": {
    "results": [
      {
        "id": 123,
        "title": "Customer Support Guide"
      }
    ],
    "total": 42
  },
  "time": "234ms"
}

Testing Strategies

Variable Resolution

Verify all variables resolve correctly:

# Configuration
URL: {{var.BASE_URL}}/api/{{endpoint}}
Header: Bearer {{var.API_KEY}}

# Test Preview
URL: https://api.example.com/api/users
Header: Bearer sk-abc123...

# ✓ Variables resolved
# ✓ Placeholders filled
# ✓ Syntax correct

Parameter Types

Test each parameter type:

TypeTest ValueExpected
String"hello world"Text value
Number42Numeric value
BooleantrueBoolean value
Object{"key": "value"}JSON object
Array[1, 2, 3]JSON array

Edge Cases

Test boundary conditions:

  • Empty values: Optional parameters
  • Special characters: URLs, JSON strings
  • Large payloads: Big objects/arrays
  • Invalid inputs: Error handling

Common Issues

Authentication Errors

401 Unauthorized

{
  "error": "Invalid API key"
}

Solution: Check your API key variable:

  1. Verify the variable value
  2. Check header format (Bearer, Basic, etc.)
  3. Ensure secret type for sensitive values

CORS Errors

Browser Console Error

Access to fetch at 'api.example.com' from origin 'app.chipp.ai' has been blocked by CORS policy

Solution: The API must allow requests from app.chipp.ai:

  • Add app.chipp.ai to allowed origins
  • Or use a proxy endpoint
  • Or implement server-side execution

Variable Not Resolving

Issue: {{var.API_KEY}} appears literally in request

Debug Steps:

  1. Check variable exists in Variables tab
  2. Verify exact name match (case-sensitive)
  3. Ensure variable has a value
  4. Check syntax: {{var.NAME}}

JSON Parse Errors

Issue: Body parameters not formatting correctly

// Bad
{
  "data": "{"nested": "value"}"
}

// Good
{
  "data": {
    "nested": "value"
  }
}

Solution: Use proper type (Object/Array) for nested data

Debug Mode

Enable detailed logging for troubleshooting:

Request Details

View the exact request being sent:

POST https://api.example.com/endpoint
Headers:
  Authorization: Bearer [REDACTED]
  Content-Type: application/json
Body:
{
  "query": "test search",
  "filters": {
    "status": "active"
  }
}

Response Details

Inspect full response:

{
  "status": 200,
  "headers": {
    "content-type": "application/json",
    "x-request-id": "req_123"
  },
  "body": {
    "success": true,
    "data": [...]
  }
}

Testing Dependencies

For actions with dependencies:

1. Test Prerequisites First

# Action 1: Get User
GET /api/user → Returns {"id": 123}

# Action 2: Get User Details
GET /api/users/123/details → Uses output from Action 1

2. Simulate Dependency Output

Test with mock values:

  • Manually provide expected values
  • Verify parameter mapping
  • Check JSONPath selectors

3. Test Full Chain

In conversation:

  1. Trigger first action
  2. Verify output stored
  3. Trigger dependent action
  4. Confirm value passed correctly

Performance Testing

Response Times

Monitor action performance:

MetricGoodWarningBad
Response Time<500ms500-2000ms>2000ms
Timeout--30s

Optimization Tips

  1. Use pagination for large datasets
  2. Cache responses when appropriate
  3. Minimize payload size
  4. Use specific field selection

Error Handling

Graceful Failures

Design actions to fail gracefully:

{
  "success": false,
  "error": {
    "code": "RESOURCE_NOT_FOUND",
    "message": "User with ID 123 not found"
  }
}

Retry Logic

For transient failures:

  • Network timeouts
  • Rate limiting
  • Temporary server errors

User-Friendly Messages

AI receives and can relay error context:

{
  "error": "Unable to send email: recipient address invalid"
}

Production Checklist

Before using in production:

Security

  • API keys in secret variables
  • HTTPS endpoints only
  • No sensitive data in URLs
  • Proper authentication headers

Reliability

  • All parameters tested
  • Error responses handled
  • Dependencies verified
  • Timeouts configured

Performance

  • Response times acceptable
  • Payload sizes optimized
  • Rate limits considered
  • Caching implemented

Documentation

  • Clear action descriptions
  • AI instructions complete
  • Example values provided
  • Variable purposes documented

Troubleshooting Guide

IssueCauseSolution
Variables not replacedSyntax errorCheck {{var.NAME}} format
Auth failsWrong credentialsUpdate variable value
TimeoutSlow APIOptimize endpoint or increase timeout
Wrong dataBad JSONPathTest path selector
No responseCORS/NetworkCheck API accessibility

Next Steps