Sometimes when my endpoint receives a shipping rate request, it seems like the request is sent too early and I’m getting null values for the address. This has happened multiple times and it’s unclear why this occurs since the majority of the shipping rate requests are being populated properly. Is there any way to send back a 400 error or something so that the customer can know to reenter their address? The CarrierService documentation only shows what the expected response should be, but doesn’t provide guidance on sending back user readable error messages.
I had thought, though, that the endpoint wouldn’t be hit until they had a valid address entered, so the fact that this even showed up in my logs is puzzling.
An actual part of a shipping rate request with personal details XXXXXed out.
destination":{"country":"US","postal_code":"XXXXXXXXXX,"province":"XXXXXXX","city":"XXXXXXXX","name":"XXXXXXX","address1":null,"address2":null,"address3":null,"latitude":null,"longitude":null,"phone":"XXXXXXXXXX","fax":null,"email":null,"address_type":null,"company_name":null}