created better error handling -- now errors bubble up server side and 500 response is returned which is handled by services.js and constroller.js with angular