List of things contains a missing/nonexistent item

I have a workflow which gets an item from the database, then iterates through all the items in a list of things field. Here’s one item and it’s list of things:

image

The thing is, the one with a red arrow does not exist at all. I call the data API for each item on the list and all of them except that particular item has a successful response. That one gives me a 404, and when I look it up in the database it’s not there.

I’m not sure how it’s possible, but it’s causing problems with my workflow.

Things can be deleted at any time. It can happen that you get a list of things with a deleted thing before the list gets updated.
If you query a thing that is non-existent and you get 404 that’s expected behaviour. You should handle the 404 in yoour logic.

@dorilama Since when can deleted things remain in a list? My understanding is that they are instantly gone once deleted. And we’re talking about a delay of more than a day at this point.

If I recall correctly there are topics about mismatches between things and lists under race conditions.
If a deleted thing is still in a list after a day (and you are sure is stored as thing, not as a string with the id of the list) you may want to talk with bubble’s support.
If your logic breaks for a 404 there is room for improvement to make it more robust.

This topic was automatically closed after 14 days. New replies are no longer allowed.