planningcenter / developers

Planning Center API docs and support
https://developer.planning.center/docs/
85 stars 8 forks source link

Person Tags API #1062

Closed trydyingtolive closed 1 year ago

trydyingtolive commented 1 year ago

Related Product Which product is this question related to? Services

Hello, I'm one of the maintainers on a Rock RMS plugin to sync PCO services to Rock. It keeps personal information in sync as well as syncs Services Tags to Rock Groups. For the most part this works well, but occasionally for whatever reason there seem to be some interruptions in the API service. It's not a big deal, perfect uptime isn't reasonable and it's only ancillary to this discussion. We only notice it because we'll have churches reach out to us, and obviously the answer is just to wait and everything will be fine shortly.

However, we do see a consistent issue that I'm trying to get to the bottom of. The plugin syncs Rock groups and Services tags so that if you add a person to one, it adds it to the other; and the same if you remove a person from a tag or group. A common symptom that happens around the time we are also seeing interruptions is that churches report that everyone will be synced out of their Rock groups. We initially assumed that the plugin wasn't handling errors when calling https://api.planningcenteronline.com/services/v2/people/{personId}/tags So we did some updates to ensure we received HTTP 200 responses and the data is not null before syncing any data.

Unfortunately, we still see this issue on occasion. We will go several months with everything behaving fine, then we will have several churches reach out to letting us know that everyone was synced out of their serving groups. It seems as if during these times when requesting the tags for a person we might be getting an empty array instead of a 503 or some other error. Is it possible that this is happening?

Thanks!

seven1m commented 1 year ago

@trydyingtolive thanks for letting us know. As far as we know, that shouldn't be possible. Would it be possible to log the result you are receiving from these API calls? Can you reproduce the issue as needed?

trydyingtolive commented 1 year ago

Thanks for looking into it @seven1m. This particular issue only happens on rare occasions. We can simulate network issues and we seem to catch those. We'll look into extending our logging.

seven1m commented 1 year ago

I looked into this further and cannot find a reason or any logs to indicate this is happening on our end. That said, it's still possible I'm missing something. If you could provide any logging on your side so we can kind of see what you are seeing from time to time, that would help. I'm going to close this now, as there is nothing actionable on our side. Please comment back if you get any further data!