Rank 2: Process
I am currently facing an issue after upgrading to 1.4.3 regarding the responseBody when returning JSON from the function.
So my Node.js function has the following lines:
log(JSON.stringify(myContainers)); return res.json(JSON.stringify(myContainers));The appwrite log output show the following (as desired) value:
[{"_id":"649808696bca89048c8f0653","name":"Rombergstraße 118","label":"Weihnachtsdeko","uuid":"6a17cb1b-4215-4538-a2ae-0ef8a0af7fc8","location":"Unbekannt","description":"","tags":["test"],"owners":[{"username":"testuser@example.com","name":"Test User","userId":"649807cb6488dc8ff3c5"}],"readUsers":[],"rfid":""},{"_id":"649808696bca89048c8f0654","name":"Bethmannstraße 115","label":"Behälter 2","uuid":"e97b24c3-df68-45ef-a7dd-c830205cfae0","location":"Unbekannt","tags":["test"],"owners":[{"username":"testuser@example.com","name":"Test User","userId":"649807cb6488dc8ff3c5"}],"readUsers":[]}]But the responseBody of the request, when using Postman returns:
"responseBody": "\"[{\\\"_id\\\":\\\"649808696bca89048c8f0653\\\",\\\"name\\\":\\\"Rombergstraße 118\\\",\\\"label\\\":\\\"Weihnachtsdeko\\\",\\\"uuid\\\":\\\"6a17cb1b-4215-4538-a2ae-0ef8a0af7fc8\\\",\\\"location\\\":\\\"Unbekannt\\\",\\\"description\\\":\\\"\\\",\\\"tags\\\":[\\\"test\\\"],\\\"owners\\\":[{\\\"username\\\":\\\"testuser@atic.ar\\\",\\\"name\\\":\\\"Test User\\\",\\\"userId\\\":\\\"649807cb6488dc8ff3c5\\\"}],\\\"readUsers\\\":[],\\\"rfid\\\":\\\"\\\"},{\\\"_id\\\":\\\"649808696bca89048c8f0654\\\",\\\"name\\\":\\\"Bethmannstraße 115\\\",\\\"label\\\":\\\"Behälter 2\\\",\\\"uuid\\\":\\\"e97b24c3-df68-45ef-a7dd-c830205cfae0\\\",\\\"location\\\":\\\"Unbekannt\\\",\\\"tags\\\":[\\\"test\\\"],\\\"owners\\\":[{\\\"username\\\":\\\"testuser@atic.ar\\\",\\\"name\\\":\\\"Test User\\\",\\\"userId\\\":\\\"649807cb6488dc8ff3c5\\\"}],\\\"readUsers\\\":[]}]\"",The problem is: the response is surrounded with additional " which are escaped (\").