ZohoDevelopers / embeddedApp-js-sdk

Js SDK for Zoho Embeded app
Apache License 2.0
49 stars 28 forks source link

ZOHO.CRM.API.insertRecords Hangs when 207 response received #14

Closed tjh-bluroot closed 5 months ago

tjh-bluroot commented 3 years ago

When a bulk record insert is made, and some of the inserts fail, the Zoho CRM API is responding with a 207 (multi-result).

The SDK code is not handling this correctly, and hangs.

tjh-bluroot commented 3 years ago

After some further investigation, it looks like the 207 response doesn't even register as a message event to the event listener in the browser.

The extension sandboxes do not respond with 207 when some records fail. They respond with 200, and the message event is registered. Zoho should probably: 1) make behaviour consistent between the environments, 2) not use 207 as it seems like it is poorly supported in the browser.

aadhil-kh-9161 commented 5 months ago

Sorry for the delayed response, we have fixed this issue long back. For 207 response, ZOHO.CRM.API.insertRecord promise will get rejected similar to other error responses like 400 / 403.