Back to Elasticsearch

Fail processor [fail-processor]

docs/reference/enrich-processor/fail-processor.md

9.4.01.4 KB
Original Source

Fail processor [fail-processor]

Raises an exception. This is useful for when you expect a pipeline to fail and want to relay a specific message to the requester.

$$$fail-options$$$

NameRequiredDefaultDescription
messageyes-The error message thrown by the processor. Supports template snippets.
descriptionno-Description of the processor. Useful for describing the purpose of the processor or its configuration.
ifno-Conditionally execute the processor. See Conditionally run a processor.
ignore_failurenofalseIgnore failures for the processor. See Handling pipeline failures.
on_failureno-Handle failures for the processor. See Handling pipeline failures.
tagno-Identifier for the processor. Useful for debugging and metrics.
js
{
  "fail": {
    "if" : "ctx.tags.contains('production') != true",
    "message": "The production tag is not present, found tags: {{{tags}}}"
  }
}

% NOTCONSOLE