ExpertPW-ECOM-00460 minutesPlaywright

Recover from malformed store data

The catalogue receives malformed JSON once and must recover on the next request.

  • ecommerce
  • network
  • error-recovery

Objective

What to automate

Arm the malformed scenario, verify the explicit error, retry, and verify products return.

Preconditions and test data

Preconditions

  • Use a fresh isolated Practice Lab browser context.
  • Open the fixture identified by FX-STORE-001.

Test data

  • scenario: malformed

Expected result

The first request displays MALFORMED_JSON without an uncaught page error; the retry succeeds.

Progressive hints

Hint 1

Arm the one-shot scenario from the Store overview.

Hint 2

Listen for pageerror and require none.

Hint 3

Retry the same request and assert a known product.

I’ve tried it — show solution
  1. Arm the one-shot scenario from the Store overview.
  2. Listen for pageerror and require none.
  3. Retry the same request and assert a known product.