Checkout validation rule fails when creating an order from a draft order

Hi everyone,

I’m using a Shopify checkout validation function. It works correctly during a normal storefront checkout, but when an order is created from a draft order, the order timeline shows:

“A checkout rule failed to run.”

The draft order is still completed, but the validation function appears to fail during execution.

Has anyone experienced this issue? Do checkout validation functions fully support draft-order checkouts, or could the input data be different or missing in this flow? What is the best way to access detailed logs for the failed execution?

Any guidance would be appreciated.

error while executing at wasm backtrace:
0: !<wasm function 1455>
1: !<wasm function 2> (trap code: Unreachable)

Please don’t tag me. I haven’t engaged in this topic at all.

Hey @Karnik_Sharma - thanks for reaching out.

Cart and Checkout Validation Functions should fully support draft-order checkouts as detailed in our docs: Cart and Checkout Validation Function API

The WASM backtrace indicates that the Function stopped during execution, but it doesn’t identify the failing field or code path. Since this only happens with draft orders, the execution input will be useful for identifying what differs from a successful storefront checkout.

To look into this further, I’d recommend contacting Shopify Support at https://help.shopify.com and creating an authenticated ticket. Please include the affected store, draft order or order ID, and failed Function run details, including its input and full STDERR. This context should help us dig in deeper.

Hope this helps!