edited server error response. maybe a little refactoring still left