Improve handling of task-assignment exceptions