error handling tests