Factor out sending failures a bit.