We had an issue with recurring alert subscriptions disappearing after approx. two weeks, so we started calling the SetAlert service every once in a while with 0 as date_start and date_end. But now we receive duplicate flight alerts. I guess the SaveAlert service can’t be treated as an upsert service? We experienced a similar issue where we had to re-register our callback endpoint after two weeks.
Is there an expiration date associated to an alert subscription (and registered webhook endpoint)?
To perform an upsert, you must ensure that you are calling SetAlert and specifying alert_id = -1. If you specify alert_id = 0 (or do not specify that argument), then it will unconditionally insert.
There is also no reason why alerts would be stopped/deleted after 2 weeks as long as you had created the alert as an indefinite time period (date_end not set to a non-zero time; additionally ident must be given as a tail number or airline with flight number, and not a unique faFlightID).
Thanks for the clarification. We’re now experiencing the following error, when setting the alert_id to -1: Backend processing error (2020-01-15T11:44:53)
The error code describes a DB SQL syntax error. Let me know if I should include the entire SOAP request/response.
We expect to be deploying a minor change this afternoon, which we don’t expect will fix it but should provide us with additional diagnostic information needed to make further progress next week.
Can you confirm that you are still getting errors from SetAlert? I’ve been checking the recent logs and don’t see any failures like the one you originally described. If necessary, re-attempt whatever logic you were doing at the time. Thanks.
Is there any cause for other users with push alerts to be concerned about with respect to this thread, or is the issue result of unique/unusual fringe-case behavior?