Merge pull request #26377 from akhilnarang/add-back-request-raise-for-status

fix(integrations): add back `response.raise_for_status()`
This commit is contained in:
Akhil Narang 2024-05-08 15:28:13 +05:30 committed by GitHub
commit 26164ca600
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)