Testing and Debugging
Test your custom actions before deploying them to production
Testing and Debugging
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:
Type | Test Value | Expected |
---|---|---|
String | "hello world" | Text value |
Number | 42 | Numeric value |
Boolean | true | Boolean 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:
- Verify the variable value
- Check header format (
Bearer
,Basic
, etc.) - 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:
- Check variable exists in Variables tab
- Verify exact name match (case-sensitive)
- Ensure variable has a value
- 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:
- Trigger first action
- Verify output stored
- Trigger dependent action
- Confirm value passed correctly
Performance Testing
Response Times
Monitor action performance:
Metric | Good | Warning | Bad |
---|---|---|---|
Response Time | <500ms | 500-2000ms | >2000ms |
Timeout | - | - | 30s |
Optimization Tips
- Use pagination for large datasets
- Cache responses when appropriate
- Minimize payload size
- 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
Issue | Cause | Solution |
---|---|---|
Variables not replaced | Syntax error | Check {{var.NAME}} format |
Auth fails | Wrong credentials | Update variable value |
Timeout | Slow API | Optimize endpoint or increase timeout |
Wrong data | Bad JSONPath | Test path selector |
No response | CORS/Network | Check API accessibility |