Whether attempt (0-indexed) is within the allowed retry count.
attempt
bool canRetry(int attempt) => attempt < maxRetries;