How to get detailed connection error information?