Skip to main content
Version: Current

Raise error

Mode: Streaming Mode: Request-Response

Description​

The Raise error component stops the current event from being processed any further by raising an error. The error is passed to the scenario's error handling, so it is logged or sent to the configured error topic like any other processing error. Raising it does not stop the scenario - processing of the following events continues normally.

Use it to reject events that should not flow further, while keeping a record of them in the standard error handling.

Parameters​

NameDescription
MessageMandatory. Evaluated per event. The message describing the error. Must not be null (validated also at runtime).
ParamsOptional. A key-value map evaluated per event, serialized to JSON and reported with the error.

The Kafka error handler writes the serialized Params map to the exceptionInput field of the error record. When Params is omitted or empty, the field is empty.

Example​

  • Message is 'Order rejected'
  • Params is {orderId: #input.id}

then, for each event reaching the node, an error is raised whose message is the rendered Message (Order rejected) and whose exceptionInput is the rendered Params serialized as JSON (for example {"orderId":42}). Only the current event is rejected; the scenario keeps running and processes the next events.