Improve TCP connection error reporting interface