Handle SSL errors and connection timeouts