🧪 How do you catch the bug that reports success?

by•

A products fetch in my iOS app came back empty. No error, no crash, nothing unusual in the logs. The purchase button simply sat there greyed out, because an empty list is a perfectly valid response and every check I had passed on it. App Review found that one and I had not.

The pattern is a call that fails without failing. An empty result, a stale cached value, a permission that was denied months ago and now returns nothing instead of an error. The user is stuck and the code is behaving exactly as written, which is why an agent cannot help much either. Ask it to reproduce the failure and it writes a test that agrees with the current behaviour.

What I have tried, and where each one runs out. Asserting on a non empty result, which works right up until empty is genuinely correct. Logging every network response, which doubles the log volume and still needs me to know what I am looking for. A manual pass on a real device before every submission, which caught this one and catches nothing that needs a specific account state.

So the question I keep coming back to: how do you catch the calls that succeed and still leave the user stuck? What has actually worked in your product, and what did it cost you to run?

7 views

Add a comment

Replies

Best

what's worked for me is not trusting the call's own success flag at all, cross-checking the result against a second independent signal that has to agree. an empty list only means something once you know whether it should've been empty, so pairing the risky fetch with a cheap parallel check (a count endpoint, last-known cached state) and diffing the two catches exactly this. costs an extra round trip, worth it for anything that gates a purchase button.