Recognize Shopify's newer *UserErrors fields (like orderCancelUserErrors) as action error
Matt Sodomsky
When a Shopify action runs a GraphQL mutation, Mechanic checks the response for a non-empty userErrors array. When one is present, the action fails — the error shows up in your run log, and mechanic/errors/action fires so error-handling tasks can respond.
Shopify has been migrating mutations to more specifically named error fields, and deprecating plain userErrors on those mutations. For example, orderCancel now reports errors via orderCancelUserErrors, and productCreateMedia uses mediaUserErrors. Mechanic currently only recognizes fields named exactly userErrors — so if your mutation selects only the newer field name (which is what Shopify's docs now recommend), errors can come back in the response while the action still reports success.
This request: teach Mechanic to recognize these renamed error fields (they all end in UserErrors) so they fail the action just like plain userErrors does today.
Matt Sodomsky
Merged in a post:
Catch orderCancelUserErrors
Brad (Tekhaus)
The orderCancel mutation returns an orderCancelUserErrors object in addition to userErrors (which is deprecated on this resource). Can Mechanic be configured to catch and throw this error when it occurs?