Added error code for case where device is being deleted but has a
current assignment.