cancel
Showing results for 
Search instead for 
Did you mean: 

Error view gets executed without an error

smit66
New Contributor II

Hello,

While using rest post snap, I have error view enabled. Snap runs without any error, but still error view gets executed. Error view updates a file in JSON format.

image

My goal is to update the file only when I get error.

Thanks for you time,
Smit

1 ACCEPTED SOLUTION

SpiroTaleski
Valued Contributor

@smit66

If there is no errors, the data will not be routed to the error view.

I assume that the “Ignore empty stream” checkbox is not checked, which means that an empty array will be written at the output view if there is no documents on the input(like in your case).

image

So always when you run the pipe, you will get empty error file, even if there is no error.

To resolve that you should check the “Ignore empty stream” checkbox in the JSON Formatter snap.

image

You can also check the SnapLogic documentation for the JSON Formatter Snap.

Regards,
Spiro Taleski

View solution in original post

2 REPLIES 2

SpiroTaleski
Valued Contributor

@smit66

If there is no errors, the data will not be routed to the error view.

I assume that the “Ignore empty stream” checkbox is not checked, which means that an empty array will be written at the output view if there is no documents on the input(like in your case).

image

So always when you run the pipe, you will get empty error file, even if there is no error.

To resolve that you should check the “Ignore empty stream” checkbox in the JSON Formatter snap.

image

You can also check the SnapLogic documentation for the JSON Formatter Snap.

Regards,
Spiro Taleski

smit66
New Contributor II

Thanks a lot.