Add success and failure events
Add test for failed handler