Skip to content

Work with the raise error operator

UbiOps pipelines come with some predefined operators that you can use. One of those operators is the raise error operator. This operator lets you raise an error somewhere in the pipeline, and is almost always used with the Conditional Logic operator.

Configuring the raise error operator

Lets say you have the pipeline that is used in the Conditional Logic operator and you want to add a custom error message to it. You can do this by adding the raise error operator to it.

First go to the operators tab and drag the Raise error onto your pipeline canvas. The UI will promt you to specify the error message you want to raise if the operator is triggered:


After filling in your error message, which in the case below is "error", you can connect the Conditional Logic operator to it:


If you want to add this operator using the Client Library you need to provide the following parameters:

Field Description
name raise-error
reference name raise-error
reference type operator
configuration (example) {
"input_fields": [],
"output_fields": [],
"error_message": "My custom error message!"

With this set-up, the error will be raised whenever the expression from the conditional logic operator evaluates to true

Note: If the error is raised this will stop the entire pipeline. The error messaged is shown once the request is completed.

This is how it looks if a pipeline fails due to the condition for the Conditional Logic operator evaluating to true:request-results

That's all there is to this operator. If you run into any issues though, do not hesitate to contact support.