'We can retry a send if the error is transient and the number of
attempts taken is fewer than the maximum allowed'

def _can_retry(self, batch, error):

    return ((batch.attempts < self.config['retries']) and getattr(error, 'retriable', False))
