removed logging and throwing a proper error