Troubleshooting

Common Errors

Because of the disconnected-oauth, async nature of the API, there are three opportunities to have a request error: both the request generation and the report collection, as well as token generation. A general best practice is to begin troubleshooting by printing the raw response. In python, this is available as follows:

request_response = requests.post(generate_reports_url, json=data, headers=headers)

print(request_response.text) # this will capture any error messages
print(request_response.json()) # this will parse json-style error messages

Invalid Client

If you're getting the following error message:

{
  "error": "invalid_client"
}

Then it's likely that your client_id or client_secret are incorrect. Double-check the values - common mistakes include capturing the single quotes: client_secret = "'abcd1234'" or forgetting a character.

I'm Out of Reports

If you're receiving the following from the Requests endpoint (after getting a token, while trying to generate reports):

{
    "ClientId": "<your-client-id>",
    "Message": "User requested more reports than they have available"
}

It's important to note that, in Python, this error message does NOT share any common dictionary keys with the anticipated report, and so downstream code may throw a KeyError. These types of errors can be caught using the error code 429 at request_response.status_code

Reports Are Null

{
  "Reports": {
      "BasePayReport": null,
      "TotalPayReport": null,
      "HourlyPayReport": null,
      "Bonus": null,
  }
}

If a report is coming back null, it is likely that the issue is because the underlying data is too varied. This can sometimes happen in National-level reports where there can be significant variance from state to state - for instance, Base Pay for a job like Waiter can vary significantly with the minimum wage in each state. In most cases, increasing the specificity of the request can remedy this - for example, looking for Waiters in a particular state, like California, will return a report. Leverage the Answers outlined in Definitions for more ways to increase the specificity of a report.

{
  "Reports": {
      "BasePayReport": {
          "CurrencyName": "U.S. Dollar (USD)",
          "CurrencyFormat": "${#}",
          "Count": 45,
      }
  }
}

Additionally, uncommon combinations of answers can cause a report to fail. Some examples of what might be considered 'uncommon' are listed below:

  • Uncommon combinations of jobs and labor markets (think a Waiter at a Seattle IT company)

  • Uncommon answers to compensable factors (think a CEO with 1 year of experience)

  • Too many unanswered compensable factors

In the above cases, try adding or changing compensable factors to refine your search and lower the variance for your report.