@roji: for clarity, this is specifically the case where the primary has gone down and a secondary hasn't yet been fully promoted. In this state - when there's no primary at all - we can attempt to wait for a while until a primary appears rather than throw immediately. This would probably involve repeatedly polling secondary states with the assumption that one of them will become the primary.
Also see #5157 (comment)