From 19b696acf66f73e6397e4c5fad69dcd00d2f74b2 Mon Sep 17 00:00:00 2001 From: Akhil Narang Date: Wed, 8 May 2024 15:14:41 +0530 Subject: [PATCH] fix(integrations): add back `response.raise_for_status()` It got removed in 59ca074780e087a9a1ff508d8b5f11a0571d5a20, however it should still be here, the point of that commit was to fix other behaviour, don't exactly remember why it was removed. Signed-off-by: Akhil Narang --- frappe/integrations/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frappe/integrations/utils.py b/frappe/integrations/utils.py index ef87317439..09907ba784 100644 --- a/frappe/integrations/utils.py +++ b/frappe/integrations/utils.py @@ -19,6 +19,8 @@ def make_request(method: str, url: str, auth=None, headers=None, data=None, json response = frappe.flags.integration_request = s.request( method, url, data=data, auth=auth, headers=headers, json=json, params=params ) + response.raise_for_status() + content_type = response.headers.get("content-type") if content_type == "text/plain; charset=utf-8": return parse_qs(response.text)