wixCodeNamespacesAndElementorySupport.min.js:1 Uncaught (in promise) error, while updating the data in wix data collection

Hi Wix Community,

In my website flow, I need to update the collections data after my customer would have paid for the service. So I am trying to update my collections after my payment gateway hit my http-endpoint. i have below query to update my collections:

await wixData.query("NewAppointments")
        .eq("_id", "8f9e0d56-555e-45f6-849d-828295832a4e")
        .descending("timestamp")
        .limit(1)
 //.eq("last_name", "Doe")
        .find()
        .then((results) => {
 if (results.items.length > 0) {
 //let item = results.items[0];
                console.log(results.items[0])
                results.items[0].paymentGwy = "PAYSTATION";
                results.items[0].paymentStatus = "SUCCESS";
                results.items[0].status = "PAID";
                results.items[0].gwytranID = "14444411-1";
                wixData.update("NewAppointments", results.items[0]);
            } else {
                console.log("No item found for 8f9e0d56-555e-45f6-849d-828295832a4e")
            }
        })

but this query is failing with "Uncaught (in promise ) - wixCodeNamespacesAndElementorySupport.min.js:1, while updating the collections.

i tried to console the wixData.update/results outcome while updating, it is showing me correct values, but when I try to query the same and check in collections updates are missing. Most probably may be because of the error.

if you guys can help me to resolve this.

Able to fix this issue. This was because of access issue to my collections.