Skip to content

The complete open source platform to run your entire marketplace. Storefront, vendor panel, admin console, and integrations in one enterprise-grade platform you own.

249 B
Raw Blame
export const orderErrorFormatter = (error: any) => {
  if (error.message === "NEXT_REDIRECT") {
    return null
  }

  if (error.message.includes("Not enough stock available")) {
    return "Not enough stock available"
  }

  return error.message
}