2018-12-20 08:04:54 -05:00
|
|
|
[[fail-processor]]
|
2020-08-12 11:49:54 -04:00
|
|
|
=== Fail processor
|
|
|
|
++++
|
|
|
|
<titleabbrev>Fail</titleabbrev>
|
|
|
|
++++
|
|
|
|
|
2018-12-20 08:04:54 -05:00
|
|
|
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
|