Custom flow script to filter out and ignore error

We are in the process of writing a custom flow and need to filter out any results where the product already exists in the database we're pushing information to.

We are having no issues with pushing the data itself, though after the initial push of information, when we push the same information we want it to ignore products that have already been pushed.

There are two different API calls to create products (POST) and modify them (PATCH).

Above is the message and code we want to exclude, i.e. so if the SKU we're attempting to push already exists and returns an error of "SKU is not unique" with code 422, we want to just ignore this error (ideally we'll use this in the future to figure out what SKUs already exist and use this as a filter for PATCHing of the records we want to update).

Many thanks and we look forward to hearing from you.

Regards,

Christian

Have you seen this article? https://docs.celigo.com/hc/en-us/articles/360045807112-Use-a-postSubmit-hook-to-ignore-specific-errors