# Troubleshoot data sources

Find out why payroll data is missing or reads as 0, what source errors mean, and how to test and fix a connection.

Source: https://support.rework.com/article/payroll-data-sources-troubleshooting

Numbers missing from a payroll? A variable stuck at 0? This article helps you find out whether a data source is to blame, what the common errors mean, and how to fix them. 🛠️

## How Payroll handles a failing source

A source that fails never stops the whole payroll. Instead, its variables read as **0** (or empty for text), the payroll records what went wrong, and people are told:

- The payroll's **Sources** tab shows a status for each source.
  
- A banner such as _No data returned from …_ appears on the payroll.
  
- The payroll's creator and followers get an in-app notification. Whoever started the pull doesn't, since they're already looking at it.
  

> **A red `#ERR!` cell is not a source problem.** It means a formula failed, for example when amounts in two currencies were combined without an exchange rate. Missing source data shows as 0, never as `#ERR!`. Check the formula (or the exchange rates) first.

## Check a payroll's Sources tab

1. Open the payroll and go to its **Sources** tab.
   
   \[IMAGE: people-ops/payroll/images/payroll-data-sources-troubleshooting-01.png | The Sources tab of a payroll with the status dot and covered-of-roster count for each source, the fetched, mapped and skipped counts, the last sync time, and the Refresh Data and Fix connection buttons marked\]
   
2. For each source, look at the status, how many employees were covered out of the roster, the rows fetched, mapped and skipped, and when it last synced.
   
3. Expand the sync history if you need to see earlier pulls.
   
4. Once the cause is fixed, click **Refresh Data** to pull again. When a built-in connection has nothing on the other end, **Fix connection** appears as well.
   

| Status | What it means |
| --- | --- |
| **success** | Everyone on the roster got data. |
| **partial** | Some rows were skipped, usually because they didn't match an employee. |
| **empty** | Nobody got data. Often a dead link, or the roster doesn't match. |
| **failed** / **error** | The request itself failed. Look at the error message. |

## Common problems and fixes

| What you see | Likely cause | What to do |
| --- | --- | --- |
| _No data returned from …_, status empty | The app behind the source isn't answering, or the rows don't match your employees | For a built-in source with nothing on the other end, click **Fix connection**. Otherwise wait for the other system to recover, then **Refresh Data**. |
| Error _unauthorized_ or _forbidden\_scope_ | The token is wrong or expired, or lacks permission | Edit the source, enter the secret again and run **Discover schema**. |
| Error _oauth\_token\_failed_ | The token URL, client ID or client secret is wrong | Check the OAuth2 settings, then try a dry-run. |
| Error _https\_required_ or _ssrf\_blocked_ | External mode with an `http://` address, or an address that points to a private network | Use a public `https://` address. For a Rework app on your own network, use **Internal (Base app)** mode. |
| Error _payload\_too\_large_ or _too\_many\_rows_ | The response is over the limit (5 MB or 10,000 rows by default) | Ask the endpoint for less, such as only the period or the fields you need. |
| Error _local\_daily\_quota_ or _local\_min\_interval_ | An external HTTP source was pulled too often | Wait for the limit to reset, then pull again. |
| Status partial, rows skipped | The key field doesn't match any employee, or **Match by** is set wrong | Check the **Key field** and **Match by**. If you match by email, make sure employees have that email in Rework. |
| A variable reads 0 although the source is connected | The field isn't mapped to a variable, or a higher-priority source overrides it | Check the variable mapping and the source priorities on the policy. |
| All HR and attendance data disappeared after adding a source | Adding a custom source switched off the automatic built-in sources | Add the built-in sources you need to the policy's **Sources & data** tab too. |
| Google Sheet shows old values | The sheet couldn't be read, so the last cached copy was used | Make sure the sheet is still shared with Rework's service account. |
| A mapped field is _no longer available_ | The source removed or renamed a field | Run **Check drift**, then fix the mappings it flags. |

## Check a source before you run payroll

On the **Sources** page (`/sources` in the Payroll app), you can test an external source without touching any payroll:

- **Discover schema** reads the source's fields, which confirms the URL and login work.
  
- **Dry-run** pulls real data for a period and a few employee IDs, and shows you the result.
  
- **Check drift** (HTTP and Google Sheets sources) compares today's fields with the last ones discovered. It lists fields that were added, removed or changed type, and the policies whose mappings are affected.
  

\[IMAGE: people-ops/payroll/images/payroll-data-sources-troubleshooting-02.png | The Check drift result for an HTTP source on the Sources page, with the added, removed and retyped field chips and the affected policies marked\]

## Quick checklist

1. Is the red cell `#ERR!`? Then it's a formula problem, not a source problem.
   
2. Open the payroll's **Sources** tab and read the status and error message.
   
3. Status empty on a built-in source? Try **Fix connection**, then **Refresh Data**.
   
4. Login errors? Re-enter the secret and run **Discover schema**.
   
5. Rows skipped? Check the key field and **Match by**.
   
6. Variable at 0? Check the mapping and the priorities.
   
7. Source structure changed? Run **Check drift**.
   

Still stuck? Share the source name, the payroll and the error message with your Rework admin or support.

## Related articles

- [Connect data sources](https://support.rework.com/article/payroll-data-sources)
  
- [Columns, variables and formulas](https://support.rework.com/article/payroll-columns-formulas)
  
- [Settings, currency and exchange rates](https://support.rework.com/article/payroll-currency-exchange-rates)
  
- [Payroll runs and records](https://support.rework.com/article/payroll-runs-records)
