diff --git a/app/subscription_webhook.py b/app/subscription_webhook.py index 57952520..70a447ed 100644 --- a/app/subscription_webhook.py +++ b/app/subscription_webhook.py @@ -22,7 +22,7 @@ def execute_subscription_webhook(user: User): "active_subscription_end": sl_subscription_end, } try: - response = requests.post(webhook_url, json=payload) + response = requests.post(webhook_url, json=payload, timeout=2) if response.status_code == 200: LOG.i("Sent request to subscription update webhook successfully") else: @@ -30,4 +30,4 @@ def execute_subscription_webhook(user: User): f"Request to webhook failed with statue {response.status_code}: {response.text}" ) except RequestException as e: - LOG.warn(f"Subscription request exception: {e}") + LOG.error(f"Subscription request exception: {e}")