Throw exception if no results are returned

Change-Id: I4928070b20e1b46ee7142e40f1429ac9a1216849