We have a number of different GET Lookups to get Products, Categories, and more from an API that we do not have control over. Whenever a GET call returns a result that is no longer in the system, it returns a 404. I tried both a postResponseMap and a pre-save J Hook function to set ignored = true, and I also just tried changing the response code to 200. Neither worked and we still have our Export showing tons of errors that aren't truly errors:
Tried J Hook between the first two flows, and within the 2nd flow (with the errors) but it doesn't seem like I can intercept & filter that response? Please let us know if this is something that is possible without completely changing all of our flows.
Just a quick update to let you know your post has resulted in much discussion here at Celigo on how best to handle this scenario. We have decided that we should enhance our code so that in cases where a call to an endpoint results in an error (such as 404), the pre-save hook will be invoked. Note that this is currently the case for paginated exports, where we make multiple calls. If the first request is successful and second request fails with the 4xx, then we send these errors in the pre-save hook.
I don't have a time estimate yet for when we will release this change, but I thank you for bringing it to our attention!
Hi @briankozub (and @davidmcdonald) - Yes, this was included in a maintenance release earlier this year. Sorry that we neglected to follow-up in this thread at that time.