Skip to content

Commit

Permalink
fix(integrations): add back response.raise_for_status()
Browse files Browse the repository at this point in the history
It got removed in 59ca074, 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 <me@akhilnarang.dev>
(cherry picked from commit 19b696a)
  • Loading branch information
akhilnarang authored and mergify[bot] committed May 8, 2024
1 parent b96ed0a commit dcf191c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions frappe/integrations/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ def make_request(method, url, auth=None, headers=None, data=None, json=None, par
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)
Expand Down

0 comments on commit dcf191c

Please sign in to comment.