added rest error class and added some modif to controller