Add test for error result being recorded