added rest error handling