Skip to content

Commit 45a35a3

Browse files
committed
Ignore webhook exceptions.
1 parent 6453c46 commit 45a35a3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/ingest.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,12 @@ def on_success(datasets):
8989
if webhook_uri:
9090
for exp_id in webhook_filenames:
9191
info_dict = {"exp_id": exp_id, "filenames": webhook_filenames[exp_id]}
92-
resp = requests.post(webhook_uri, json=info_dict, timeout=0.5)
93-
logger.info("Webhook response %s: %s", info_dict, resp)
92+
try:
93+
resp = requests.post(webhook_uri, json=info_dict, timeout=0.5)
94+
logger.info("Webhook response %s: %s", info_dict, resp)
95+
except Exception:
96+
# Ignore webhook exceptions
97+
logger.exception("Webhook exception for %s", info_dict)
9498

9599

96100
def on_ingest_failure(dataset, exc):

0 commit comments

Comments
 (0)