Resolved bug 1685 - POL hangs waiting for webhook response 68/11268/2
authorAtul Agarwal <Atul.Agarwal@Altran.com>
Mon, 18 Oct 2021 17:22:58 +0000 (17:22 +0000)
committeragarwalat <atul.agarwal@altran.com>
Tue, 19 Oct 2021 03:41:32 +0000 (05:41 +0200)
Change-Id: Id0c3154491545c177ec3fb74aa82ad71acabdaf6
Signed-off-by: Atul Agarwal <Atul.Agarwal@Altran.com>
osm_policy_module/alarming/service.py

index b93dba7..13433ba 100644 (file)
@@ -27,7 +27,7 @@ import json
 import logging
 
 import requests
-from requests.exceptions import ConnectionError
+from requests.exceptions import ConnectionError, RequestException
 
 from osm_policy_module.common.common_db_client import CommonDbClient
 from osm_policy_module.common.lcm_client import LcmClient
@@ -235,6 +235,9 @@ class AlarmingService:
                         )
                         try:
                             requests.post(url=action.url, json=json.dumps(payload))
+                        except RequestException as e:
+                            log.info("Error connecting to url %s", action.url)
+                            log.debug("RequestException %s", e)
                         except ConnectionError:
                             log.exception("Error connecting to url %s", action.url)