Add error handler for client
Merge pull request #1 from philiphoy/master

Add error handler for client