How do we catch exception?

Options
We are using the Stripe API, when duplicate products are inserted, an exception will be thrown by the Stripe API.  We need to catch it and continue the script, instead of breaking it.

On a sidenote, how do we export database or backup?  

Thanks
Joe

Comments

  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options
    You can add a Precondition(s) in regard to the response from the Stripe API call on whatever is important. This often times can be simply checking the status code:

    [Screenshot_2021-08-11_17-53-51.png]
    You can use dot notation on the variable to parse to the status or whichever field is important. 

    The Precondition will be to enforce that something is true. If you don't need to do that but do logic on way or the other depending on what is returned then you can use a Conditional (If...Then...Else)
  • Joe Thong
    Joe Thong Member
    Options
    oh thanks michael, let me try to use this approach