Smiley
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. Drake
Make an update API call instead of create
Smiley
Smiley
Is this the right way?
Drake
No... You're calling create document...
Smiley
Yes I did, but then If the error == 409 (conflict) then it'll trigger the other function
Drake
Sorry I don't see any update document call
Smiley
I'll call it here
Drake
Okay sure
Recommended threads
- Type Mismatch in AppwriteException
There is a discrepancy in the TypeScript type definitions for AppwriteException. The response property is defined as a string in the type definitions, but in pr...
- What Query's are valid for GetDocument?
Documentation shows that Queries are valid here, but doesn't explain which queries are valid. At first I presumed this to be a bug, but before creating a githu...
- Appwrite exception: user_unauthorized, t...
After refreshing the app it is working perfectly