AppwriteException: general_unknown, Server Error (500) is shown instead of specified error
- 0
- Databases
- Flutter

steps to reproduce :
- create 2 collections, host and target.
- in host collection, add a
one to one
ormany to one
relationship to target collection with attribute nametarget_document
. - create a document in target with an ID = "12345"
- using dart SDK , create a host document
databases.createDocument
and it the data, give the target document ID (of relationship) as integer instead of a string.
data = {
"target_document" : 12345,
};
in the appwrite logs, its pointing out the correct error as in image below:
Message: Invalid relationship value. Must be either a document, document ID, or an array of documents or document IDs.
but in the dart SDK , its throwing general_unknown(500) error. which is very hard to identify and debug. in SDK it should show correct error that "given relationship ID in invalid" or something like that.

Sounds like you know the solution to this already. It's best to create a GitHub issue for changes to Appwrite

this is just a made up case to demonstrate the some exceptions given by the SDK is vague (Server Error (500) ) instead of specific. so its hard to debug without using appwrite log.

i wish to get more specific exceptions in the SDk (dart).
Recommended threads
- User (role: guests) missing scopes (["te...
I keep getting this error: ```AppwriteException: User (role: guests) missing scopes (["teams.read"]) at new AppwriteException (/usr/local/server/src/functio...
- Queries Length Error.
Hi All, I am having a issues across my app with how i am getting data, and just wanted to check if this was an issues with the new changes on appwrite over the...
- The current user is not authorized to pe...
I'm just getting this error while it was working couple minutes ago, my users have permissions to access and create tables data but on some databases I'm just g...
