private static boolean shouldCountAsErrorForRandomSendTrigger(Reply reply) {
            if (reply.getNumErrors() != 1) {
                return !reply.hasErrors(); // For simplicity, count any reply with > 1 error.
            }
            var error = reply.getError(0);
            return switch (error.getCode()) {
                // TODO this feels like a layering violation, but we use DocumentProtocol directly in other places in this policy anyway...
                case DocumentProtocol.ERROR_TEST_AND_SET_CONDITION_FAILED, DocumentProtocol.ERROR_BUSY -> false;
                default -> true;
            };
        }
Returns whether a given error Reply should be counted towards potentially ignoring the cached
cluster state and triggering a random send (and thus likely WrongDistributionReply with the
current cluster state). Certain error codes may be used frequently by the content layer for
purposes that do _not_ indicate that a change in cluster state may have happened, and should
therefore not be counted for this purpose:
 - ERROR_TEST_AND_SET_CONDITION_FAILED: may happen for any mutating operation that has an
   associated TaS condition. Technically an APP_FATAL_ERROR since resending doesn't make sense.
 - ERROR_BUSY: may happen for concurrent mutations and if distributors are in the process of
   changing bucket ownership and the grace period hasn't passed yet.
documentapi/src/main/java/com/yahoo/documentapi/messagebus/protocol/ContentPolicy.java