Fix to use server error handling
Merge pull request #8 from ionux/master

Fix to use server error handling