All guides

Order details break without a delivery date

The order endpoint returns HTTP 200 with an empty estimate. The client throws while formatting the date, so the customer loses the whole details view.

RIDGE SUPPLYGoods for the long run

Your account Orders

Order history

Order details

Order referenceorder_demo_001
Order details couldn’t load

Your order is still in your history.
The details are unavailable right now.

Saved response

200 OK
RequestGET /orders/order_demo_001
Response body
{
  "id": "order_demo_001",
  "total_minor": 4200,
  "delivery_date": ""
}
Client resultDate conversion throws

The formatter attempts to convert an empty string to a date.

delivery_date: "" → Invalid Date
Authored synthetic example · version 1.0.0

Hold the response steady. Fix the client.

The selected request is GET /orders/order_demo_001. Its 200 response includes an empty delivery_date. The original formatter tries to convert it to a date and throws. The corrected formatter keeps the order visible and explains that the estimate is unavailable.

Download the files and run them with Node.js before installing anything. They exercise a small client view model using local JSON; they make no network requests or Gostly calls. The packet is an example format for this check, not a Gostly import file.

Original client
delivery_date: ""Date conversion throws

The order view cannot be returned for the failing case.

Corrected client
delivery_date: ""Delivery estimate unavailable

The requested order ID and total remain in the returned view.

Normal control
delivery_date: "2026-10-30"Delivery estimate: 2026-10-30

Both clients must preserve the known date. An always-unavailable shortcut fails.

Use the same assertions for both clients

# Save all three downloads in the same directory.
node check-order-view.mjs broken
# Expected: a failing regression check; exit 1.

node check-order-view.mjs fixed
# Expected: all declared cases pass; exit 0.

The expected view and rejection rules are declared in the packet, separately from either formatter. The original command should fail; keep that result. Switching to the corrected client should satisfy the same rules. This is a consumer-logic exercise, separate from checking a rendered screen or a proxy replay.

  • Absent estimate: empty string and null are accepted absence values for this authored contract. They must produce an unavailable estimate while preserving the order.
  • Normal date: a valid date must still be displayed. Replacing every estimate with a placeholder is not a fix.
  • Invalid date: malformed nonempty text, an impossible calendar date and a missing field must be rejected. The formatter must not hide all errors as absence.
  • Other invalid responses: a different order ID, a non-200 status or an invalid total must not become a successful order view.

This example accepts date-only YYYY-MM-DD values; it does not define timestamp, time-zone or freshness rules. Its ID, status and total checks surround the isolated date-formatting defect. Adapt the contract to your application rather than copying those assumptions into another API.

Carry the useful evidence into your own reproduction

REPRODUCTION RECORD · fill in for your own case
Bug and assertion: [what fails; what the client should show or do]
Selected request: [method, route, query, relevant body and resource ID]
Selected response: [status, relevant headers and reviewed body]
Source and coverage: [capture/session or authored fixture; version]
Routing / matching: [service, configuration and response origin]
Starting state: [database records, session, cache and clock, if relevant]
Original client revision / outcome: [revision; observed failure]
Changed client revision / outcome: [revision; same assertion]
Controls: [normal case; invalid input; wrong resource; wrong status]
Data review: [what was removed; where retained copies may exist]
Known gaps: [what this exchange cannot reproduce]

An ordinary fixture can be enough for a formatter bug. When HTTP routing, parsing or SDK behavior matters, retain the safe exchange and verify the intended replay response before applying the same client assertion. For an existing capture, use the HAR preparation guide and its actual import format.

Do not add an ignore or normalization rule that makes a different order satisfy this test. Keep the separate baseline review for the later question of whether a changed upstream response should replace the retained case.