How can I handle Conflict errors 'if a document already exists (in collection) then I want to edit it instead'
TL;DR
The user is asking for help with error handling. They want to know how to handle conflict errors when a document already exists. The solution is to make an update API call instead of a create call.Make an update API call instead of create
Is this the right way?
No... You're calling create document...
Yes I did, but then If the error == 409 (conflict) then it'll trigger the other function
Sorry I don't see any update document call
I'll call it here
Okay sure
Recommended threads
- Upgrading selfhost version?
It is okay to upgrade version to higher one, of my current version is 1.7.4 to 1.8.1. Is that safe to do cause my clients already have data on that? Also is a...
- Appwrite cloud DB server error 500
Getting this error
- appwrite indexes not working (?
i have this index: ``` "indexes": [ { "key": "single-user-per-event", "type": "unique", ...