#Server Error when updating an existing document via UpsertDocument

19 messages · Page 1 of 1 (latest)

calm torrent
#

I am getting "AppwriteException: general_unknown, Server Error (500)" when using UpsertDocument on Appwrite Cloud from a function with Dart 3.5 runtime and dart_appwrite: 16.2.0. The error only occurs if a document with the same ID already exists. The function works correctly when creating a new document.

calm torrent
fringe gate
calm torrent
#

the project id is 688ff2ab001d8312a1ef. I DM'd you the function id and a successful vs error execution id (one creating the document, the next attempting to update it)

fringe gate
calm torrent
fringe gate
calm torrent
calm torrent
# fringe gate Oh interesting...I've definitely seen it work. That's odd you're having this err...

Ok, I figured it out. If the data of the document is the same, the server error is thrown.

Full source of project:
https://github.com/Colton127/upsert_document_test/blob/main/lib/main.dart

The commit that introduced the error changed saving data dynamic data to static:
https://github.com/Colton127/upsert_document_test/commit/fe79ba2d54d95d607d50d14040f41235206a0903

The associated functionId is 689508c30014b2cc1e50

GitHub

Contribute to Colton127/upsert_document_test development by creating an account on GitHub.

#

One solution is to see if the document already exists, and if so, compare the data to check for changes. But I'd rather avoid unnecessary server requests.

fringe gate
fringe gate
#

ok weird...i tried an upsert with an existin value but it worked fine..

#

im making the api call manually though

fringe gate
#

Have you created a github issue for this?

calm torrent
fringe gate
fringe gate