|
await this.client.post<{ salesorder: SalesOrder }>({ |
The zoho client does not check the json return and status code. I would suggest to throw an error if the status code is not 200 or if the returned json has some errors like in this example response:
{"code":0,"message":"Sales order status has been changed to Confirmed.","data":{"ava_invoice_ids":[],"email_errors_info":[{"code":36007,"ids":["116240000001641005","116240000001641027","116240000001641045"],"message":"Invalid sales order status."}],"email_success_info":{"message":"The status of the Sales order has been changed to Open."}}}
zoho-ts/src/service/salesOrder.ts
Line 160 in f86ffbd
The zoho client does not check the json return and status code. I would suggest to throw an error if the status code is not 200 or if the returned json has some errors like in this example response:
{"code":0,"message":"Sales order status has been changed to Confirmed.","data":{"ava_invoice_ids":[],"email_errors_info":[{"code":36007,"ids":["116240000001641005","116240000001641027","116240000001641045"],"message":"Invalid sales order status."}],"email_success_info":{"message":"The status of the Sales order has been changed to Open."}}}