cancel
Showing results for 
Search instead for 
Did you mean: 

Stopping pipeline execution when REST snap fails in pipeline

omair
Contributor

I have a pipeline that retrieve data from an external REST API, performs some data transformations and returns the resulting data.

Part of the data transformations require looks that rely on the inbound payload so I have a copy snap to enable the lookups. However, the problem is that when the REST snap itself fails (as shown in the image) the happy path flow (the Join snap and the Map Entity with Titles snap followng it) continues to execute.

image

The error path is forwarded to an error pipeline as shown below:
image

What is the simplest way of dropping the existing the happy path flow when the REST snap returns an error in the case above?

Thanks,

2 REPLIES 2

viktor_n
Contributor II

Hi @omair,

I am not sure what configuration you have in Join. You need to provide more details.

You can solve this by setting flags.
One flag to be somewhere between REST GET and Join snap and this flag will be created by field which you expect to be on output from REST Get snap.
And the other one flag to be always true in “Title Type Mapper”.
If RES Get fails flag will be set as false and when execution comes to Join, flags will not match.

SpiroTaleski
Valued Contributor

@omair

You can try with Inner Join and putting “1” for Left and Right path.

In that case the Join snap will expect data from both inputs and will produce output only if there is a data from both inputs.

In case REST Get fails, the data will go to the linked error pipeline, and the Join will not process data further.

Regards,
Spiro Taleski