Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Email notification on "Custom script post-function" fails

thorsan82 September 25, 2018

Hi,

 

Is there a way to enable email notifications whenever a "Custom script post-function (inline script)" in an e.g. Issue state transition, fails?

 

I know there is a message written to the log, is there a way to enable email notifications whenevere there is an error in the log? Or write a listener which listens for errors in the log?

 

Thanks,

T

1 answer

0 votes
Ivan Tovbin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 25, 2018

If you know exactly what kind of exception is thrown when your script fails, you can use a try-catch closure in your code to send an email whenever this error occurs.

thorsan82 September 25, 2018

Yes, I can do this, but I have dozens of scripts and want to avoid changing all scripts and I would like to cover a wide range of exceptions.

Ivan Tovbin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 25, 2018

Then I suggest using a 3rd party log analyzer or you can write your own script which would run on schedule and check your logs for errors, and send you notifications.

Suggest an answer

Log in or Sign up to answer