A Shop may toggle Rate Failure on and off on the Settings > General page of the Advanced Shipping Rules App.
When Rate Failure is enabled and no rates are found for a given array of items shipping to the destination address, the API will return a success header with an error message along with a null rates object.
If Rate Failure is not enabled, one rate object will be returned with the total price set as 0.
Example Response when Rate Failure is enabled:
HTTP/1.1 200 OK
{
"error":true,
"message":"No rates found; rate failure is enabled",
"rates":null
}
Example Response when Rate Failure is not enabled:
[
{
"service_name":"Standard Shipping",
"service_code":"no-methods",
"total_price":0,
"currency":"USD"
}
]