OpenSearch/docs/reference/ingest/processors/fail.asciidoc

26 lines
735 B
Plaintext

[[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]]
.Fail Options
[options="header"]
|======
| Name | Required | Default | Description
| `message` | yes | - | The error message thrown by the processor. Supports <<accessing-template-fields,template snippets>>.
include::common-options.asciidoc[]
|======
[source,js]
--------------------------------------------------
{
"fail": {
"if" : "ctx.tags.contains('production') != true",
"message": "The production tag is not present, found tags: {{tags}}"
}
}
--------------------------------------------------
// NOTCONSOLE