Return error instead of throwing exception when saving task.