Forum Discussion

Henchway's avatar
Henchway
Contributor
4 years ago
Solved

Throw error to trigger error pipeline

Hello,

I’m wondering if there is any way to trigger the error pipeline, without having to execute it with a Pipeline Execute snap. The idea is that I filter for Client or Server errors, which i’d like to handle differently based on the error code and in case of an internal server error, simply throw it to the error pipeline to log the error and create a ticket.

Does anyone have an idea of a good way of throwing the error to the error pipe without explicitly triggering it through a Pipeline Execute snap?

Best regards
Thomas

  • mongley's avatar
    mongley
    4 years ago

    You could send the errors via a Mapper snap, then if you right click on the output circle you will see the option to ‘Link output to error pipeline’ - this will send the mapper output to the error pipeline configured in the pipeline settings.

4 Replies

  • bojanvelevski's avatar
    bojanvelevski
    Valued Contributor

    What about setting the default behavior to send all of the errors to the error pipeline, where you can develop a logic to classify the errors based on the incoming data?

    • Henchway's avatar
      Henchway
      Contributor

      I have a generic error pipeline, which logs errors to a database and later picked up by a mechanism to create internal support tickets. I’d like to keep the default behavior without adding an extra pipeline. But generally, yes, i suppose that would work.

      • mongley's avatar
        mongley
        New Contributor II

        You could send the errors via a Mapper snap, then if you right click on the output circle you will see the option to ‘Link output to error pipeline’ - this will send the mapper output to the error pipeline configured in the pipeline settings.