Hi I am using the following code
def request_task(url, data, headers):
        try:
            re = requests.post(url, json=data, headers=headers)
            re.raise_for_status()
        except requests.exceptions.HTTPError as e:
            print (e.response.text)
I am able to handle the http error but not able to to handle connection errors How can i modify my code to handle the types connection error ? Thank you
 
    