Updated to test for specific errors.