raise exception when resource id is blank