Skip to content
Last updated

Troubleshooting

API requests made by the Embed appear on the API logs page in the Checkr Dashboard. Candidate invitations and reports can be viewed in the Checkr Dashboard. You can filter by the Checkr candidate or the external candidate ID. Use the enableLogging argument in any embed to see requests made in the browser using Chrome developer tools.

const embed = new Checkr.Embeds.NewInvitation({ enableLogging: true })

Common error messages

All validation errors returned by Checkr APIs calls are shown on the embed's UI. Use the API logs in the Checkr Dashboard (and other general tactics) to understand which API calls are failing.

The embed also includes an error message specific to the embed:

Error MessageReasons
This account has not been approved for useThe POST web_sdk/session_tokens request has failed because the account is not credentialed to send Invitations.
Contact Checkr to enable Account Hierarchy for your accountThe GET /nodes request has failed because the account does not have Account Hierarchy enabled.
Could not load Account dataThe SessionToken cannot be acquired. API logs will show the POST /web_sdk/session_tokens request failing. The GET /packages or GET /nodes requests have failed due to bad authentication.

Note: When an embed loads for the first time, it sends an HTTP POST request to your backend, requesting a SessionToken. To surface any errors that may occur from this request on the embed's UI, send the status and data from the error response.

router.post("/session-tokens", async (req, res, next) => {
  const authenticated = authenticateUser();

  if (authenticated) {
    try {
      const response = await axios({
        headers: { "Content-Type": "application/json" },
        method: "POST",
        url: `${apiHost}/web_sdk/session_tokens`,
        auth: {
          username: oAuthAccessToken,
          password: ""
        },
        data: {
          scopes: ["order"]
        }
      });

      res.send(response.data);
    } catch ({ response: { status, data } }) {
      // Send over error data to surface errors from the Checkr API to the Embeds UI
      res.status(status).send(data);
    }
  } else {
    res.sendStatus(401);
  }
});