Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
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}
Adding to this, when customers are sending up invalid addresses, I would like to find a way to return back some "Problems found with your address, please correct" error message as opposed to falling back to a backup shipping rate and allowing the order to go through.
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025