Updated test to accept returned error