Use a task to handle network errors