better exception handling with newer server versions
modernized the test a bit