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

# safetyChecks

> Checks to ensure the crawl was successful.

* **Type**: `object`

For more information,
see [Safety checks](/doc/tools/crawler/getting-started/crawler-configuration#safety-checks).

## Examples

```js JavaScript icon=code theme={"system"}
{
  safetyChecks: {
    beforeIndexPublishing: {
      maxLostRecordsPercentage: 10,
      maxFailedUrls: 15

    }
  }
}
```

## Parameters

<ParamField body="beforeIndexPublishing" type="object">
  Checks triggered after the Crawler finishes,
  before pushing the records to Algolia into the final index.

  <Expandable>
    <ParamField body="beforeIndexPublishing.maxLostRecordsPercentage" type="number" default={10}>
      Defines the limit of records difference between the new and the last crawl as a percentage of total records (inclusive).
      If the new number of records is less than `last number of records * (1 - maxLostRecordsPercentage / 100)`,
      the process throws a `SafeReindexingError`, blocking the crawler until manual restart.
    </ParamField>

    <ParamField body="beforeIndexPublishing.maxFailedUrls" type="number">
      Maximum allowed number of URLs failed to crawl.
      By default, the crawler doesn't stop if it encounters such errors.
    </ParamField>
  </Expandable>
</ParamField>
