added exception when no rest object