Webhook for calculating shipping fees

We are having an issue with a webhook for calculating shipping fees.

The error we recieve is “snipcart.js:1 A ‘shipping-rates’ error occured in Snipcart.” with a “Bad Request: Ok”.

Our logs show that the webhook returns data in the proper format.

To complicate matters even further, the issue is not persistent; sometimes placing the exact same order and providing the same shipping details, no error is received. In some cases where we get the shipping-rates error we can click ‘edit’ and resubmit the shipping details, which sometimes allows us proceed to payment. Again, this behaviour appears random, and we are unable to tell why and when it occurs.