#Document already existed
6 messages · Page 1 of 1 (latest)
Can you post a bit of your code
result = await db.createDocument(
util.IDs.database_id,
util.IDs.subscription_collection_id,
ID.unique(),
{
"SubscriptionType": subscription.type,
"End": subscription.end,
}
)
The thing is, I cannot even add a document on the web, giving the same error. I tried other collections, they work fine
Error: Document with the requested ID already exists. Try again with a different ID or use ID.unique() to generate a unique ID.
at Client.call (/usr/local/server/src/function/node_modules/node-appwrite/lib/client.js:206:15)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async Databases.createDocument (/usr/local/server/src/function/node_modules/node-appwrite/lib/services/databases.js:1711:16)
at async /subscription/start-trail (file:///usr/local/server/src/function/src/main.js:87:14)
at async /api (file:///usr/local/server/src/function/src/main.js:110:11)
at async Module.default (file:///usr/local/server/src/function/src/main.js:19:11)
at async execute (/usr/local/server/src/server.js:208:16)
at async action (/usr/local/server/src/server.js:232:7)
at async /usr/local/server/src/server.js:14:5
I don't see the option for Multiple document under the settings of the collection ?