Add server error listener.
Merge pull request #8 from mcomella/error

Add server error listener.