Back

[SOLVED]I am not getting the JSON Response that I returned from SDK Function which I have created.

  • 0
  • Databases
  • Functions
  • Web
Sandeep K. Dasari
8 Jun, 2023, 18:05

Instead I am getting this response.

TL;DR
The user was not receiving the JSON response that they returned from an SDK function they created. They realized that they had mistakenly written "true" instead of "false" as the third parameter while creating the execution. They have solved the issue and are now receiving the correct response.
Sandeep K. Dasari
8 Jun, 2023, 18:07
TypeScript
{
  "success":true,"error":false,
  "message":"New Item is successfully added to cart :)",
  "data":{
      "seller_id":"2312342423",
      "location_id":"3242442412412",
      "customer_id":"3242423421423",
      "product_id":"s3rqr3453453",
      "quantity":34,
      "$id":"7328c4f1-5c02-4847-8c11-b9da3dc84bc3",
      "$permissions":[],
      "$createdAt":"2023-06-08T17:57:19.662+00:00",
      "$updatedAt":"2023-06-08T17:57:19.662+00:00",
      "$collectionId":"64816f544f942a48182b",
      "$databaseId":"64816c7d76fe80dada91"
  }
}
Sandeep K. Dasari
8 Jun, 2023, 18:08

But I am sending this success response... I want this to come as a response after I have create the function execution.

Sandeep K. Dasari
8 Jun, 2023, 18:20

I have solved the issue.

Sandeep K. Dasari
8 Jun, 2023, 18:21

I have written 3rd parameter wile creating the execution as truw. It should be false .

Sandeep K. Dasari
8 Jun, 2023, 18:22
Sandeep K. Dasari
8 Jun, 2023, 18:25

such that, I have gotten the object which contains response . I have parsed it and stored in a variable as shown below.

Sandeep K. Dasari
8 Jun, 2023, 18:25

[SOLVED]I am not getting the JSON Response that I returned from SDK Function which I have created.

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