Add before_retry_block.