I have a list of documents with an ID number between 1 and 10.
1 2 3 4 5 6 7 8 9 10. i am filtering by a random integer between 1 and 10
if a document is deleted and that id number is no longer available it returns an error when that number is chosen randomly. IE
1 2 3 5 6 7 8 9 10 (4 has been removed) when the filter returns a 4 it results in a null error.
How do it get it to skip 4 when 4 doesn't exist and only display documents with id numbers that exist?
I am using supabase as my backend database
Please be specific in your answer as i am new to this.
Thank you