Can BigCommerce change their API response to be more clear when a program tries to post a shipment that already exists?
When posting shipments to BigCommerce, if the shipment already exists, then you receive the following error message.
<?xml version="1.0"?>
<errors>
<error>
<status>400</status>
<message>The field 'quantity' is invalid.</message>
<details>
<invalid_reason>The quantity specified is greater than the quantity of the product that is available to ship.</invalid_reason>
<available_quantity>0</available_quantity>
<order_product_id>628</order_product_id>
</details>
</error>
</errors>
I agree that it is a bad request, but it has nothing to do with the quantity of the item. Can we do something like the following for the message
or invalid_reason
instead?
The shipment [insert ID here] already exists and cannot be added.
This would make for a much more usable API.