made error handling test more rigorous