Added tests for the error path feature