Skip to main content
Something broke? Start here. Most connector issues fall into recognizable patterns.

Debugging workflow

When a connector fails, follow this diagnostic sequence:
  1. Check logs - What error message?
  2. Inspect output - Did sync produce a .c1z file?
  3. Verify config - Are credentials valid?
  4. Test API access - Can you hit the target API directly?
  5. Isolate the issue - Which resource type fails?

Enable debug logging

Log levels: debug, info, warn, error

Inspect sync output

Use the baton CLI to inspect what was synced:

Common errors

Pagination loop detected

Error: next page token is the same as the current page token Cause: Your List(), Entitlements(), or Grants() method returned the same pagination token it received.
The SDK detects this and returns an error to prevent infinite loops.

Authentication failed

Error: 401 Unauthorized or 403 Forbidden Causes:
  • Invalid or expired credentials
  • Missing required scopes/permissions
  • Wrong API endpoint
Diagnostic steps:

Rate limited

Error: 429 Too Many Requests or slow sync performance Solutions:
  1. Reduce page size (more pages, smaller requests):
  2. The SDK handles backoff automatically via uhttp:
  3. Add explicit delays if needed:

Resource type mismatch

Error: Grants reference principals that don’t exist Cause: The ResourceId in a grant doesn’t match any synced resource.
Debug:

Empty sync results

Error: Sync completes but produces no resources Causes:
  • API returns empty results (permissions issue)
  • Pagination starts past end of data
  • Filter too restrictive

Connection refused

Error: connection refused or no such host

TLS certificate errors

Error: x509: certificate signed by unknown authority For testing only - skip TLS verification:
Never use --insecure-skip-verify in production.
For production - add the CA certificate:

Performance issues

Slow sync

Memory issues

Daemon mode issues

Task polling failures

Error: failed to poll for tasks or authentication error

Connector not receiving tasks

Symptoms: Daemon runs but never processes anything Check:
  • Connector registered in C1 admin UI
  • Sync scheduled
  • Correct connector ID

Provisioning issues

Grant/revoke failures

Error: error: provisioner not found for resource type Cause: Declared provisioning capability but didn’t implement the interface.
Verify capabilities:

Duplicate objects after sync

Symptom

After running a sync, you see duplicate resources in C1: one created via Terraform/API and a separate one discovered by the connector.

Causes

  1. RawId not set - Connector doesn’t include the RawId annotation
  2. ID format mismatch - Connector uses a different ID format than expected
  3. match_baton_id value incorrect - Terraform resource has wrong ID value
  4. Case sensitivity - IDs may be case-sensitive

Resolution

Step 1: Verify the connector outputs RawId annotation:
Step 2: Check what ID the connector uses: Step 3: Update Terraform to use the exact match:
Step 4: Delete duplicate and re-sync.

Diagnostic commands

Getting help

If you’ve tried these steps and still have issues:
  1. Search existing issues on the connector’s GitHub repo
  2. Check SDK issues at baton-sdk issues
  3. Open a new issue with:
    • Connector name and version
    • Error message (full text)
    • Debug logs (sanitized of credentials)
    • Steps to reproduce

Quick reference

Debug flags

Diagnostic tools