imbahub
Menu +
US
Talk to us
IMBAHUB / Knowledge & guides

A late API response overwrites the visitor’s new choice

The response belongs to an older request than the current interface state.

A late API response overwrites the visitor’s new choice
  1. Starting condition

    When an external API is slow, the interface needs an honest fallback. An old response must not restore the wrong choice merely because it arrived last.

  2. Implementation

    Delay choice A and let B respond first in the test environment. Verify that late A does not replace B. Repeat after a timeout, abandoned navigation and another attempt.

  3. Verification

    Only the current choice can update the view, and a timeout offers a meaningful next step.

  4. Decision

    Check request identity before updating and use cancellation where supported. A client stopping its wait does not mean a server-side operation was undone.

Only the current choice can update the view, and a timeout offers a meaningful next step.

Which check determines the next step?

Check request identity before updating and use cancellation where supported. A client stopping its wait does not mean a server-side operation was undone.

Start with a reproducible failure

When an external API is slow, the interface needs an honest fallback. An old response must not restore the wrong choice merely because it arrived last.

Use a small controlled test to separate a symptom from its cause. Record the starting state, affected URL and observed outcome so that another person can repeat the check.

Collect evidence before changing anything

Delay choice A and let B respond first in the test environment. Verify that late A does not replace B. Repeat after a timeout, abandoned navigation and another attempt.

Fictional example: A visitor switches from region A to B. B shows the right contact route, but A’s slower response arrives later and restores the wrong region.

CheckExpected outcome
Starting conditionThe response belongs to an older request than the current interface state.
ImplementationDelay choice A and let B respond first in the test environment. Verify that late A does not replace B. Repeat after a timeout, abandoned navigation and another attempt.
VerificationOnly the current choice can update the view, and a timeout offers a meaningful next step.

Fix the cause and repeat the test

Check request identity before updating and use cancellation where supported. A client stopping its wait does not mean a server-side operation was undone.

Repeat the same test after the change and add a nearby case that already worked. One successful case establishes that task in those conditions; it does not certify the whole website.

What the test establishes

Only the current choice can update the view, and a timeout offers a meaningful next step.

Sources and further reading

Questions, answered

Is passing an automated test enough?

Combine technical checks with the actual visitor task. Document the environment, conditions and remaining limitations.

Which check determines the next step?

Check request identity before updating and use cancellation where supported. A client stopping its wait does not mean a server-side operation was undone.

IMBAHUB

Let’s plan your website

Describe the website task and the failure or development requirement you want to scope.

Talk to us
Existing English product interface with fictional demonstration content; reused for the US website.

Existing English product interface with fictional demonstration content; reused for the US website.