Delete in entity-storage

Hi Team,

Good day!

We have tried to delete the data from the entity storage but the flow keeps on entering into the catch method even if the data is removed!

Is this a bug?

If so is there any work-around to get this fixed?

Kindly let us know.


1 Like

Can you share the code you used for the delete method along with any screenshots of the error?

Hi @kaustavdm

I can confirm that similar issue is faced by me as well while deleting the record from entity storage.


Hi @kaustavdm,

Please find the code below.

const deleteTask = async(display_id) => {
    console.log("display_id " , display_id)
    try {
        const taskEntity = $db.entity({ version: "v1" }).get("tasks");
        await taskEntity.delete(display_id);
        return [false, `${display_id} removed successfully!`];
    } catch (err) {
            `[Custom Objects] Unable to remove task. Reason: ${err.message}`

        return [true, {msg:`unable to remove ${display_id}: ${err.message}`, status : err.status}]

The flow enters into catch, the err parameter in the catch is undefined.

Please let me know if you need any other data.


1 Like

Thanks for the code sample, @Bene_Immanuel, and for the confirmation @Sachin_Kumar. This helps a lot. I am able to reproduce this issue, though intermittently.

I’ll work with our engineers to debug this further. Thank you for bringing this to our attention.

1 Like

Hi @Bene_Immanuel & @Sachin_Kumar, hope things are well.

I tried using the code snippet you have posted in one of test app and I was not able to reproduce this issue. Is it possible to share the app zip so I can debug this further?


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.