No internet connection
  1. Home
  2. Questions

Avoiding Errors in Read Json

By Thomas Weiß @barthmetall
    2022-06-14 08:17:35.090Z

    Hi,
    i am using the Read Json action to query some statusinfo from my sophos firewall.
    But sometimes the request returns an error.
    This is not a problem, but i get an e-mail that the automation failed.
    I use the "assign status code to" and check the variable to handle the failed response and end the automation. So there is no need for an additional notification e-mail.

    Would it somehow be possible to make the automation not to fail ?

    Cheers

    • 3 replies
    1. L
      Liam @liam
        2022-06-14 12:36:19.547Z

        I can't think of a way that would stop it from firing the "error" flag against the trigger.
        You could disable the email notifications of errors, this is done in File -> Program Options, there is a check box to email trigger errors here.

        1. B
          In reply tobarthmetall:
          Thomas Weiß @barthmetall
            2022-06-14 14:27:40.410Z

            Hi Liam,
            yes but this would turn off notifications for all triggers, and this not what i need.
            More something like: if "assign status code to" is used then turn off error handling for "read json".

            The "read json Document" is only one action in the whole automation and i dont want the whole automation to fail just because only one step (read json ...) failed.
            With evaluation of the Status Code i can do the error handling myself and choose to fail the automation or not.

            1. LLiam @liam
                2022-06-21 08:51:15.178Z

                I'm not sure if there is a way to get what you want with TA4, but I've tested a similar scenario with TA5 and when using the "on error" action in that, if you "resume" the automation, the automation isn't disabled due to an error.