Rank 2: Process
steps to reproduce :
- create 2 collections, host and target.
- in host collection, add a
one to oneormany to onerelationship to target collection with attribute nametarget_document. - create a document in target with an ID = "12345"
- using dart SDK , create a host document
databases.createDocumentand 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.