Skip to content

Check API result of salesOrder.confirm #14

Description

@tilman

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."}}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions