--- title: Indexing pipeline extension `actionOnError` slug: '129' canonical_url: https://docs.coveo.com/en/129/ collection: index-content source_format: adoc --- # Indexing pipeline extension `actionOnError` Indexing pipeline extension script `actionOnError` value is defined in the source extension configuration (see [Edit a source JSON configuration](https://docs.coveo.com/en/1685/)). This value sets an action in case the extension script times out or fails. When adding an extension to a source, if you don't set an `actionOnError` value, the default value is `SKIP_EXTENSION`. [%header,cols="3"] |=== |actionOnError value |Type |Behavior when the extension script times out or fails: |`SKIP_EXTENSION` a|**string** default a|* The item continues through the [Document Processing Manager](https://docs.coveo.com/en/1893/). * Future extension scripts still can be read and applied to the item. |`REJECT_DOCUMENT` |**string** a|* The item doesn't continue through the DPM. * No future extension scripts can be read and applied to the item. * The item is deleted at the indexing stage. |=== > **Note** > > When an extension script timeout or fail, whatever the `actionOnError` value is, the extension script isn't applied to the item. **Example** Consider the following extension script: ```python # identical script for myExtensionScript1 and myExtensionScript2 raise ValueError('this script always raises an error!') ``` The following JSON configuration contains two identical post conversion extensions with different `name`, `extensionID` and `actionOnError` values. The `actionOnError` value associated with `myExtensionScript1` means that when an error is raised during the script execution, the extension script is skipped, the item continues through the DPM and future extension scripts can be read and applied to the item. Since the item continues through the DPM, `myExtensionScript2` raises an error which leads to the item deletion at indexing stage. ```json { "common": { "preConversionExtensions": [], "postConversionExtensions": [ { "condition": "", "extensionId": "myorganization-qdfs7z5nyw46ygfwg3lwzw2oei", "parameters": {}, "versionId": "", "actionOnError": "SKIP_EXTENSION", "name": "myExtensionScript1" }, { "condition": "", "extensionId": "myorganization-qsu6wwlpvzkv6wtr4ctg7pshue", "parameters": {}, "versionId": "", "actionOnError": "REJECT_DOCUMENT", "name": "myExtensionScript2" } ] }, "items": {} } ``` Inverting the extension scripts order means that `myExtensionScript2` prevents the item from going forward in the DPM as future extension scripts are ignored, ultimately leading to the item deletion at the indexing stage.