fail.asciidoc 772 B

1234567891011121314151617181920212223242526272829
  1. [[fail-processor]]
  2. === Fail processor
  3. ++++
  4. <titleabbrev>Fail</titleabbrev>
  5. ++++
  6. Raises an exception. This is useful for when
  7. you expect a pipeline to fail and want to relay a specific message
  8. to the requester.
  9. [[fail-options]]
  10. .Fail Options
  11. [options="header"]
  12. |======
  13. | Name | Required | Default | Description
  14. | `message` | yes | - | The error message thrown by the processor. Supports <<template-snippets,template snippets>>.
  15. include::common-options.asciidoc[]
  16. |======
  17. [source,js]
  18. --------------------------------------------------
  19. {
  20. "fail": {
  21. "if" : "ctx.tags.contains('production') != true",
  22. "message": "The production tag is not present, found tags: {{{tags}}}"
  23. }
  24. }
  25. --------------------------------------------------
  26. // NOTCONSOLE