Throw exception when no ids