test for error