Added test for succesful calling error handler