throw error when send fails, create related tests