It should be the only place as it’s the case trying to decide whether or not to cache the value passed back from the server.
Just based on the logic alone, ‘0’ is clearly a gap here. The check should be >= 0 otherwise 0 gets converted to -1. I missed it on code review and somehow didn’t hit it in testing.
Edit: it’s also funny how things evolve because idiomatically speaking, I would not normally have code the block this way and would have opted for one return result at the end. The upside being you wouldn’t have hit this issue. The downside being that result=0 would never have been cached and we’d never know. Makes me think.