Adding error event
Fire error event on bad requests
Minor fixes
Added subscription test