check for connection exception