cancel
Showing results for 
Search instead for 
Did you mean: 

Passing error reason to error pipeline

nishant_k9
New Contributor II

I have designed an error pipeline which accepts few pipeline parameters like ruuid, label, error etc. I have configured this error pipe line in all other pipelines in my project to make call to this pipeline in case of error. I am not able to find any way to directly pass error reason, resolutions etc as parameter… Is there any expression that can be used to achieve this…?
Screenshot 2022-06-01 at 2.58.17 PM

1 ACCEPTED SOLUTION

SpiroTaleski
Valued Contributor

@nishant.k9

If you capture the error message that is delivered to error pipeline using File Writer or Record Replay Snap, you will notice that the error message structure contains the fields like error, reason, resolution, stacktrace etc.

You don’t have to pass the error, reason, resolution as a error pipeline parameters.
In the error pipeline, in separate Mapper Snap you can map those fields(error, reason, resolution):

image

View solution in original post

5 REPLIES 5

SpiroTaleski
Valued Contributor

@nishant.k9

In case of error, every error message generated in SnapLogic will have following fields always:

  • error
  • reason
  • resolution

So in the error pipeline, you just have to map the those fields from the incoming error message:

$reason
$resolution
$error

BR
Spiro Taleski

@Spiro_Taleski
Thank you for the response but the doubt is about what expression should we pass to error pipeline so that it get captured. Like for ruuid we pass pipe.ruuid, for label we pass pipe.label. Similarly for error what expression is to be passed…? Please check the screen shot I have attached just now

SpiroTaleski
Valued Contributor

@nishant.k9

If you capture the error message that is delivered to error pipeline using File Writer or Record Replay Snap, you will notice that the error message structure contains the fields like error, reason, resolution, stacktrace etc.

You don’t have to pass the error, reason, resolution as a error pipeline parameters.
In the error pipeline, in separate Mapper Snap you can map those fields(error, reason, resolution):

image

@Spiro_Taleski
Thank you… It worked like charm…! you saved my day.
Can you also tell me, from where we can get this list of error variables, like you listed 3 of them??
I am not able to see the previews in parent pipeline.