Error patterns

Learn about the use of the product, variation, and locale patterns in Admin API error codes.

In Global Commerce, understanding and swiftly resolving errors is crucial to maintaining product integrity and ensuring a seamless customer experience. Errors can arise at any stage, from product creation to updating existing products across various locales. Identifying the source of these errors—whether they pertain to a specific product, a variation of a product, or a locale—is essential for timely correction and prevention of future issues. This section will guide you through recognizing common error patterns, decoding error messages, and implementing effective solutions.

Error message format

Understanding the format of error messages is the first step toward effective troubleshooting. Each error message is structured to provide clear and immediate insights into the nature and location of the issue at hand. This guidance will break down the components of an error message, demonstrating how to identify whether the issue relates to a product, a product variation, or a locale-specific concern. With this knowledge, you can quickly act to rectify any problems, ensuring minimal disruption to the global commerce process.

To identify content in the error message, look for the following prefixes and identifiers within the message:

  • Product or variation prefix: Indicates whether the error is related to a product (Product) or a product variation (Variation).

  • External reference identifier (ERID): A unique code ([ERID]abc-1234) that identifies the product or product variation.

  • Product identifier (productId): A specific code assigned to the product or variation ([productId]1912344500).

  • Locale: If the error is specific to a locale, it will be indicated with a locale-string prefix (en_US).

Examples:

  • For a product-related error, you might see: Product [ERID]abc-1234 [productId]1912344500, en_US

  • For a product variation error, the format will be similar but with Variation as the prefix instead of Product.

By examining these components within the error message, you can accurately identify whether the issue pertains to a specific product, product variation, or is localized to a specific market.

Update existing product

Product errors related to existing products or product variations combine the Product or Variation prefix, external reference identifier (ERID), and the product identifier (productId). For example:

  • Product [ERID]abc-1234 [productId]1912344500, en_US: The error belongs to a specific product (productId) with a specific ERID and locale.

  • Product [ERID]abc-1234 [productId]1912344500: The error belongs to a specific product (productId) with a specific ERID.

  • Product [productId]1912344500, en_US: The error belongs to a specific product (productId) and locale.

  • Product [ProductId]1912344500: The error belongs to a specific product (productId) and has no ERID.

Update existing product variation

  • Variation [ERID]abc-1234 [productId]1912344500, en_US: The error belongs to a specific product variation (productId) with a specific ERID and locale.

  • Variation [ERID]abc-1234 [productId]1912344500: The error belongs to a specific product variation (productId) with a specific ERID.

  • Variation [productId]1912344500, en_US: The error belongs to a specific product variation (productId) and locale.

  • Variation [productId]1912344500: The error belongs to a specific product variation (productId) and has no ERID.

Create product

  • Product abc-1234, en_US: The error belongs to a specific locale. The ERID exists in the product payload.

  • Product abc-1234: The error belongs to the product. The ERID exists in the product payload.

  • Product: The error belongs to the product. There is no ERID in the product payload.

  • Variation abc-1234, en_US: The error belongs to a specific locale. The ERID exists in the product variation payload.

  • Variation abc-1234: The error belongs to a specific product variation. The ERID exists in the product payload.

If you don't specify the ERID when creating a product, the prefix uses 1st, 2nd, 3rd, and 4th to distinguish the product variations. For example:

  • 1st Variation, en_US: The error belongs to a specific locale associated with the first product variation. There is no ERID in the product payload.

  • 2nd Variation: The error belongs to a specific locale associated with the second product variation. There is no ERID in the product payload.

Create a product variation for an existing base product

  • Variation, en_US: The error belongs to a specific locale. There is no ERID in the product payload.

  • Variation: The error belongs to a specific product variation. There is no ERID in the product payload.

  • Variation abc-1234, en_US: The error belongs to a specific locale. There is no ERID in the product payload.

  • Variation abc-1234: The error belongs to a specific base product or product variation. There is no ERID in the product payload.

Deployment errors and warnings

Deployment errors and warnings do not include the ERID or Variation pattern to remain consistent with Global Commerce errors and warnings.

  • Product 12345678, en_US: The error belongs to a specific base product or product variation locale.

  • Product 12345678: The error belongs to a specific base product or product variation.

Last updated