2.0 Beta

Smootify 2.0 is in public beta. Your 1.x store keeps working. Move when you want.

What changed

smootify:errors

Shopify's errors of a cart operation, or the error a filter threw

v2.0 beta
Open .md
On this page
  1. Listen
  2. Payload
  3. UserError

Shopify’s errors of a cart operation, or the error a filter threw Since 1.x.

Listen

window.Smootify = window.Smootify || [];
window.Smootify.push((api) => {
  api.on("errors", (payload) => {
    // …
  });
});

Payload

UserError[]

UserError

/** An error Shopify answers (a sold-out variant, an invalid code) or a filter throws. */
export interface UserError {
  message: string;
  field?: string[] | null;
  code?: string | null;
}

    ↑ ↓ to moveEnter to openEsc to close