Back

500 Error Even Though Query Was Successful

  • 0
  • Databases
  • Cloud
itsjustintime
20 Sep, 2023, 23:31

I make an update request to a collection. It returns a 500 status code even though the data looks updated in Appwrite Cloud dashboard. My request is pretty straightforward and is fired off via the web client in React: return db.updateDocument(config.databaseId, config.mediaCollectionId, mediaId, serializedFields);

I'm writing stringified JSON into a string field that is within range of my character limit.

The error message is cryptic and I don't know how to move forward to resolving it. This is a problem for me because I have an onSuccess block that manages some internal caching in my application. It's not firing because of the error even though the data looks good.

Request:

TypeScript
Request URL:
https://cloud.appwrite.io/v1/databases/63a9465bf069da4ee9ef/collections/64ef71bcbf5f618e9511/documents/64f2ec0d1dd6d46ec25b
Request Method:
PATCH
Status Code:
500
Remote Address:
157.230.79.70:443
Referrer Policy:
strict-origin-when-cross-origin

Response:

TypeScript
{
    "message": "Server Error",
    "code": 500,
    "type": "general_unknown",
    "version": "0.10.56"
}
TL;DR
The user is experiencing a 500 error when making an update request to a collection in Appwrite Cloud. The data appears to be updated correctly in the dashboard, but the error is preventing the `onSuccess` block from firing. Other users also report similar 500 errors. It is unclear what is causing the issue, but it may be related to maintenance or a recent cloud upgrade. A possible solution is to wait for Appwrite to resolve the issue.
telemetry
20 Sep, 2023, 23:42

i get error 500 for update requests just now.. using the appwrite sdk.. it was fine before.....But the query operations seems fine though.... here's my log: Reloaded 9 of 2390 libraries in 230ms (compile: 52 ms, reload: 71 ms, reassemble: 85 ms). [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: AppwriteException: general_unknown, Server Error (500) #0 ClientMixin.prepareResponse (package:appwrite/src/client_mixin.dart:73:9) #1 ClientIO.call (package:appwrite/src/client_io.dart:373:14) <asynchronous suspension> #2 Databases.updateDocument (package:appwrite/services/databases.dart:123:17) <asynchronous suspension> #3 updateSite (package:registry_flutter_app/database.dart:151:10) <asynchronous suspension> #4 _UpdateSiteWorkTypeFormState.build.<anonymous closure> (package:registry_flutter_app/forms/update_site_worktype_form.dart:118:25) <asynchronous suspension> .. and it also happens in my webapp too..

itsjustintime
21 Sep, 2023, 00:17

Yeah, I just realized it's occurring for other queries as well that are using DB. It's not limited to the one I detailed above. These queries were working fine yesterday. πŸ€”

itsjustintime
21 Sep, 2023, 00:17

Wonder if it's related to the Cloud upgrade.

Drake
21 Sep, 2023, 00:24

ya....i think this might be due to our maintenance. someone is looking into it.

versun
21 Sep, 2023, 00:47

i also got multiple 500 error: HTTPError: 500 Server Error: Internal Server Error for url: https://appwrite.rsstranslator.com/v1/databases/db_main/collections/t_rss/documents/64e969064178b9d1b4d1 And some function executions still in Processing

Drake
21 Sep, 2023, 02:41

can you try again?

Drake
21 Sep, 2023, 02:42

@telemetry and @versun would you also please try again?

telemetry
21 Sep, 2023, 02:42

@Steven it’s working now thank you

versun
21 Sep, 2023, 02:43

Yeah! It's working now. Thanks a lot

itsjustintime
21 Sep, 2023, 03:04

I'm still receiving the same error

itsjustintime
21 Sep, 2023, 03:08

I only see it in one area though. Earlier it was erroring out in all parts of the application.

dlohani
21 Sep, 2023, 03:11

What area? and will you be able to share the projectId that's having the issue

itsjustintime
21 Sep, 2023, 03:13

sorry I'm trying to play around with my app to figure out what parts. The area that's having a problem is the one I initially messaged about.

TypeScript
{
    "message": "Server Error",
    "code": 500,
    "type": "general_unknown",
    "version": "0.10.56"
}
``` Getting this right now. Same situation: updating a document with some fields and it's being saved properly but I'm getting a 500 in response.

For this collection.
https://cloud.appwrite.io/console/project-63a941b33d5b09aa6211/databases/database-63a9465bf069da4ee9ef/collection-64ef71bcbf5f618e9511
dlohani
21 Sep, 2023, 03:20

The data is saved, but you are getting 500?

itsjustintime
21 Sep, 2023, 03:24

Yup that's right. I just checked again. The operation returns a 204 for OPTIONS and then it returns a 500 for PATCH.

itsjustintime
21 Sep, 2023, 03:24

The data is updated in my collection.

telemetry
21 Sep, 2023, 04:33

@Steven now console seems to have some problems.. i deleted timestamp attribute but it's still there... and added new attributes and they have "processing"

itsjustintime
21 Sep, 2023, 06:36

I just checked 3 hours later and it seems to be fixed now. I'm not getting that error anymore.

telemetry
21 Sep, 2023, 06:45

the console seems to be working now after i got back..

dlohani
21 Sep, 2023, 07:52

Thanks!

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more