> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hightouch.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Debug a sync run

> The live debugger shows every request and response Hightouch exchanged with your destination during a sync run, down to a single row.

Use it to answer one question: did the run send the changes you expected, and if not, why. Work through it in order — find the run, read its outcome, isolate the rejected rows, inspect the payload, then fix and verify.

> [!NOTE]
>
> Hightouch retains row-level debugger logs for seven days, and you can't export
> rows from runs older than that. Run summaries stay available for 30 days. For
> longer history, use [Warehouse Sync Logs](https://docs.hightouch.com/syncs/warehouse-sync-logs.md).

## Before you begin

* A sync that has run at least once. Viewing row-level tabs requires debug access to the sync.

## Find the run

Open the **Runs** tab on the sync's page. Each row is one run, with its **Started** time, **Run status**, **Rows queried**, **Operations**, and **Results** (successful operations in green, rejected in red).

![Sync runs list showing runs completed with errors](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/syncs/debugger/sync-runs-braze.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=2095d1fb48e08e8e2b813e820ecdb596)

A run's status tells you where to look next:

* **Completed** — the run finished and every row landed.
* **Completed with errors** — the run finished, but the destination rejected some rows. Open it and go to the **Rejected** tab.
* **Failed** — an error stopped the whole run before it could send rows. Click **See error message** on the row to read it.
* **Canceled by user** — someone stopped the run.
* **Querying**, **Processing**, or **Queued** — the run is still in progress.

![Runs list with a failed run and its See error message link](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/syncs/debugger/sync-runs-salesforce-marketing-cloud.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=9cbf1141d51d41a94ab8d2acbd9bbdf0)

To narrow a long list, click **Filter** and choose **Hide runs with 0 operations** or **Hide runs with 0 successful operations**. Run timestamps appear in your local timezone under **Started**, so you can line them up with when you noticed the problem.

## View run details

Click **View run** to open the run. The **Summary** tab breaks the run into phases so you can see how far it got and where rows dropped:

* **Preparing to sync** — waiting in queue and initializing.
* **Querying source** — executing the model query and detecting changes, shown as added (`+`), changed (`△`), and removed (`−`) rows.
* **Syncing to destination** — **Sending data**, with a count of rows synced successfully and rows rejected.
* **Wrapping up** — saving logs.

![Run summary showing the querying source phase](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/syncs/debugger/run-summary.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=c656c5a3b3d74229af4c09a2347b5474)

A red **Sending data** bar with rejected rows is the signal to open the **Rejected** tab and inspect them.

![A run summary with its Summary, Successful, Rejected, and Configuration tabs, showing rows rejected while sending data](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/syncs/run-summary-detail.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=02df0566547f1414cbaaaf70958f77f9)

The added, changed, and removed counts reflect your [sync mode](https://docs.hightouch.com/syncs/types-and-modes.md#sync-modes):

* **Added** rows are new in the model's query results since the previous run.
* **Changed** rows were in the previous results but now have updated values.
* **Removed** rows are no longer in the query results.

For example, an [**insert** mode](https://docs.hightouch.com/syncs/types-and-modes.md#sync-modes) sync only shows **added** rows even when rows left the model, and an [HTTP request destination](https://docs.hightouch.com/destinations/http-request.md) that only triggers on [**Rows changed**](https://docs.hightouch.com/destinations/http-request.md#choose-request-triggers) only shows **changed** rows.

If the run failed during query execution with a warehouse SQL error, see [resolve SQL compilation errors](https://docs.hightouch.com/models/sql-compilation-errors.md).

## Inspect rejected rows

The **Successful** and **Rejected** tabs list the individual rows in the run. To find a specific one, search by the value of the model's [primary key](https://docs.hightouch.com/models/creating-models.md#unique-primary-key-requirement) — the search matches on the primary key column only.

Each rejected row shows the error the destination returned for it. Hightouch passes these through as the third-party API sent them, including HTTP status codes and any trace IDs.

![The Rejected tab listing rows with their primary keys and error messages](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/syncs/run-rejected-rows.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=ad040388d8ee1acbad4b16559a184e86)

To work through many rows at once, export the run's rows or just its row errors as a CSV or JSON file, then search them in your editor. Exporting requires permission to update the workspace, and is available for runs from the last seven days.

## Use the live debugger

To see the exact request and response behind a row, click the row to open the live debugger. It shows the request and response payloads the row was part of, along with the other rows in the same batch.

For example, a `POST` request that fails with a 400 error shows the destination's error in the response — such as an `undefined` object in the request body. Hightouch also shows the request URL: an `undefined` value in the URL means a required ID never populated, which points you back to the model's query results.

### Payload inspection

Click the expand icon in the payload viewer to open a payload full-screen, then click in the body and press `⌘F` / `Ctrl+F` to search it for a row ID, email address, or any other value. Click the copy icon to copy the payload to your clipboard. For large nested payloads, paste the JSON into a tree viewer to browse it as collapsible properties.

## Fix and verify

Match the fix to what the payload and error told you:

| What you saw | Where to fix it |
| - | - |
| A warehouse SQL error during querying | [Resolve SQL compilation errors](https://docs.hightouch.com/models/sql-compilation-errors.md) |
| A value in the wrong format or type | [Data types and casting](https://docs.hightouch.com/models/data-types-casting.md) |
| The wrong record updated, or a matching failure | [Record matching](https://docs.hightouch.com/syncs/record-matching.md) |
| A missing or malformed field in the request | [Field mapping](https://docs.hightouch.com/syncs/mapping-data.md) |
| A `401` or credentials error | The destination's connection settings |
| A `500`-series or rate-limit error | Wait for the destination to recover; Hightouch [retries](https://docs.hightouch.com/syncs/retries.md) automatically |

After you change the model or sync configuration, run the sync again and confirm the new run completes with zero rejected rows.

## HTTP status codes

Any HTTP status code in an error comes from your destination, not from Hightouch. The codes fall into five groups:

* **1xx** — informational; the request was received.
* **2xx** — success; the request was accepted.
* **3xx** — redirection; further action is needed.
* **4xx** — client error; the request was invalid or can't be fulfilled.
* **5xx** — server error; the destination failed to fulfill the request.

The codes you'll see most often:

* **200** — the destination accepted the request.
* **400** — usually invalid data. Check your values against the destination's API expectations.
* **401** — a credentials problem. Confirm your destination credentials have the required permissions.
* **500-series** (500, 502, 504) — a problem inside the destination. Check its status page for outages; Hightouch [retries](https://docs.hightouch.com/syncs/retries.md) the sync.

See [Mozilla's HTTP status reference](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status) for the full list.

Because Hightouch returns destination errors verbatim, pasting an unfamiliar message into a search engine or the destination's developer community is often the fastest way to understand it.
