---
title: "Testing and Debugging — AVCodex Docs"
description: "Testing and Debugging — AVCodex documentation for AV integrators, programmers, and ops teams."
lang: en
json-ld:
---

[](/)

Solutions

[Pricing](/pricing)[The Signal](/blog)[Resources](/resources)

Learn

[Free AI Assessment](/scorecard)[Get Started →](/pricing)

[Documentation Home](/docs)

Guides 

Custom Actions 

-   [Overview](/docs/custom-actions/overview)
-   [Getting Started](/docs/custom-actions/getting-started)
-   [Action Collections](/docs/custom-actions/action-collections)
-   [Parameter Configuration](/docs/custom-actions/parameter-configuration)
-   [Variables and Secrets](/docs/custom-actions/variables-and-secrets)
-   [Testing and Debugging](/docs/custom-actions/testing-and-debugging)
-   [Examples](/docs/custom-actions/examples)
-   [Single-Use Custom Actions](/docs/custom-actions/single-use-custom-actions)

Pro Actions 

API 

Builder API 

Agentic Commerce (ACP) 

Integrations 

[Docs](/docs)/ Custom Actions / Custom Actions 

# Testing and Debugging

Last updated · MAR 2026 · [Read as Markdown](/docs/custom-actions/testing-and-debugging.md)

> **Note:** Custom Actions require a Builder plan or higher. [Upgrade to Builder](https://app.avcodex.com/plans)

## [Built-in request tester# ](#built-in-request-tester)

Test your actions inside the configuration interface.

### [1\. Configure your action# ](#1-configure-your-action)

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

### [2\. Open the test panel# ](#2-open-the-test-panel)

The test panel shows:

-   Resolved URL with variables.
-   Headers with substitutions.
-   Body data structure.
-   Query parameters.

### [3\. Provide test values# ](#3-provide-test-values)

For AI-generated parameters, enter test values:

json 

```
{
  "searchQuery": "boardroom 4 commissioning",
  "limit": 10,
  "includeArchived": false
}
```

### [4\. Execute the test# ](#4-execute-the-test)

Click **Test Request** to:

-   Send the actual HTTP request.
-   View response status.
-   Inspect response body.
-   Check response time.

### [5\. Review results# ](#5-review-results)

json 

```
{
  "status": 200,
  "response": {
    "results": [
      {
        "id": 123,
        "title": "Boardroom 4 commissioning report"
      }
    ],
    "total": 42
  },
  "time": "234ms"
}
```

## [Testing strategies# ](#testing-strategies)

### [Variable resolution# ](#variable-resolution)

Verify all variables resolve correctly:

bash 

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

URL: https://api.example.com/api/rooms
Header: Bearer sk-abc123...
```

### [Parameter types# ](#parameter-types)

Test each parameter type:

Type

Test value

Expected

String

`"boardroom-4"`

Text value.

Number

`42`

Numeric.

Boolean

`true`

Boolean.

Object

`{"key": "value"}`

JSON object.

Array

`[1, 2, 3]`

JSON array.

### [Edge cases# ](#edge-cases)

Test boundary conditions:

-   **Empty values:** optional parameters.
-   **Special characters:** in URLs and JSON strings.
-   **Large payloads:** big objects or arrays.
-   **Invalid inputs:** error handling.

## [Common issues# ](#common-issues)

### [Authentication errors# ](#authentication-errors)

**401 Unauthorized**

json 

```
{
  "error": "Invalid API key"
}
```

**Solution:** check your API key variable:

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

### [CORS errors# ](#cors-errors)

**Browser console error**

code 

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

**Solution:** the API must allow requests from `app.avcodex.com`:

-   Add `app.avcodex.com` to allowed origins.
-   Or use a proxy endpoint.
-   Or run the call server-side.

### [Variable not resolving# ](#variable-not-resolving)

**Issue:** `{{var.API_KEY}}` appears literally in the request.

**Debug steps**

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

### [JSON parse errors# ](#json-parse-errors)

**Issue:** body parameters not formatting correctly.

json 

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

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

**Solution:** use the proper type (Object/Array) for nested data.

## [Debug mode# ](#debug-mode)

Enable detailed logging for troubleshooting:

### [Request details# ](#request-details)

View the exact request being sent:

bash 

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

### [Response details# ](#response-details)

Inspect the full response:

json 

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

## [Testing dependencies# ](#testing-dependencies)

For actions with dependencies:

### [1\. Test prerequisites first# ](#1-test-prerequisites-first)

bash 

```
GET /api/me → Returns {"id": 123}

GET /api/users/123/details → Uses output from Action 1
```

### [2\. Simulate dependency output# ](#2-simulate-dependency-output)

Test with mock values:

-   Manually provide expected values.
-   Verify parameter mapping.
-   Check JSONPath selectors.

### [3\. Test the full chain# ](#3-test-the-full-chain)

In a conversation:

1.  Trigger the first action.
2.  Verify output is stored.
3.  Trigger the dependent action.
4.  Confirm the value passes through correctly.

## [Performance testing# ](#performance-testing)

### [Response times# ](#response-times)

Monitor action performance:

Metric

Good

Warning

Bad

Response time

<500ms

500-2000ms

\>2000ms

Timeout

\-

\-

30s

### [Optimization tips# ](#optimization-tips)

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

## [Error handling# ](#error-handling)

### [Graceful failures# ](#graceful-failures)

Design actions to fail gracefully:

json 

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

### [Retry logic# ](#retry-logic)

For transient failures:

-   Network timeouts.
-   Rate limiting.
-   Temporary server errors.

### [User-friendly messages# ](#user-friendly-messages)

The agent receives error context and can relay it to the tech:

json 

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

## [Production checklist# ](#production-checklist)

Before going live:

### [Security# ](#security)

-   \[ \] API keys in secret variables.
-   \[ \] HTTPS endpoints only.
-   \[ \] No sensitive data in URLs.
-   \[ \] Proper authentication headers.

### [Reliability# ](#reliability)

-   \[ \] All parameters tested.
-   \[ \] Error responses handled.
-   \[ \] Dependencies verified.
-   \[ \] Timeouts configured.

### [Performance# ](#performance)

-   \[ \] Response times acceptable.
-   \[ \] Payload sizes optimized.
-   \[ \] Rate limits considered.
-   \[ \] Caching implemented.

### [Documentation# ](#documentation)

-   \[ \] Clear action descriptions.
-   \[ \] AI instructions complete.
-   \[ \] Example values provided.
-   \[ \] Variable purposes documented.

## [Troubleshooting guide# ](#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 or network

Check API accessibility.

## [Next steps# ](#next-steps)

-   [View examples](/docs/custom-actions/examples)
-   [Parameter configuration](/docs/custom-actions/parameter-configuration)
-   [Manage variables](/docs/custom-actions/variables-and-secrets)

\*AVCodex · Your AV expertise. Amplified by AI.\*

Was this helpful? 

[Edit this page →](#)

[

Previous

Variables and Secrets

](/docs/custom-actions/variables-and-secrets)[

Next

Examples

](/docs/custom-actions/examples)

On this page

-   [Built-in request tester](#built-in-request-tester)
-   [1\. Configure your action](#1-configure-your-action)
-   [2\. Open the test panel](#2-open-the-test-panel)
-   [3\. Provide test values](#3-provide-test-values)
-   [4\. Execute the test](#4-execute-the-test)
-   [5\. Review results](#5-review-results)
-   [Testing strategies](#testing-strategies)
-   [Variable resolution](#variable-resolution)
-   [Parameter types](#parameter-types)
-   [Edge cases](#edge-cases)
-   [Common issues](#common-issues)
-   [Authentication errors](#authentication-errors)
-   [CORS errors](#cors-errors)
-   [Variable not resolving](#variable-not-resolving)
-   [JSON parse errors](#json-parse-errors)
-   [Debug mode](#debug-mode)
-   [Request details](#request-details)
-   [Response details](#response-details)
-   [Testing dependencies](#testing-dependencies)
-   [1\. Test prerequisites first](#1-test-prerequisites-first)
-   [2\. Simulate dependency output](#2-simulate-dependency-output)
-   [3\. Test the full chain](#3-test-the-full-chain)
-   [Performance testing](#performance-testing)
-   [Response times](#response-times)
-   [Optimization tips](#optimization-tips)
-   [Error handling](#error-handling)
-   [Graceful failures](#graceful-failures)
-   [Retry logic](#retry-logic)
-   [User-friendly messages](#user-friendly-messages)
-   [Production checklist](#production-checklist)
-   [Security](#security)
-   [Reliability](#reliability)
-   [Performance](#performance)
-   [Documentation](#documentation)
-   [Troubleshooting guide](#troubleshooting-guide)
-   [Next steps](#next-steps)

[](/)

The AI platform built exclusively for professional AV. Build, deploy, and sell AI tools that understand your industry.

### Platform

-   What You Can Build
-   Templates
-   [Pricing](/pricing)

### Services

-   [Done-For-You](/pricing)
-   [Academy](/academy)
-   [Contact](/contact)

### Company

-   About
-   [The Signal](/blog)
-   [Docs](/docs)
-   [LinkedIn](#)

© 2026 AVCodex. A Future Ready Holdings Inc. product. SOC 2 Type II Certified · HIPAA Compliant