Error handler for the publish post processing sequence

Hi,
I would like to ask if there is a way to hook up an error handler for the publish background task in TD14 to catch if a postprocess plugin has failed. We have a reporting system connected to the Tridion Docs' publishing chain but in case of an error we can not determine what it was and if it happened at all. We can of course catch errors in our post process plugins but we'd also like to catch other errors may occure in the publish process in general.

  • Hi Istvan,

    In older versions, where we used VBS scripts, we had scenarios that publishing just kept going even an error occurred. This was using unnecessary server resources and also holding up the publishing queue. With the redesign of the publish process, we are now running Publish plugin, as you mentioned. Each plugin is now responsible for a specific task. We have a wrapper around it that executes each configured plugin.

    As soon as one plugin runs into an error, the entire process stops and the status will be set to Failed. To know the error message, a user needs to login into the system, go to the eventlog and see which plugin failed. 

    To answer your question, it is not possible to have another plugin catching any errors that occurred before the plugin. That is because the entire process stops as soon as a plugin is in an error state and it will never reach the plugin to capture the errors. 

    If you want to notify your users of any publish job that is in a failed state, I would suggest to query the event log. You have a few options here.

    The first one is a basic one where a process queries the eventlog in a configured timeframe. The query would then check for any failed publication that day and report it to the user: See also: SDL Documentation

    The other option is to write a plugin that gets triggered at the start of your publish job. This plugin can notify an external service providing useful information such as the Event ID. The external service can then query the event and see if it gets to a failed state. You can retrieve the details of that event by using GetEventDetail  --> SDL Documentation

    I hope this helps

  • Hi Jered,

    Thanks for your reply. We then implement the polling service solution.

    /István