Check lastError in connect failure