Fixes #29 - Provide error event instead of close reason