modified the error handling on the RESTful Web Service.