Hello,
I am sending post request on MS graph via server script:
frappe.make_post_request(f'https://graph.microsoft.com/v1.0/me/events/{doc.custom_bee_outlook_event_id}', headers = headers, data = data)
but in few causes the response from server is:
" If successful, this method returns 202 Accepted
response code. It doesn’t return anything in the response body."
But the empty body is a problem for frappe, it generates this error log:
Traceback with variables (most recent call last):
File "apps/frappe/frappe/integrations/utils.py", line 26, in make_request
return frappe.flags.integration_request.json()
method = 'POST'
url = 'https://graph.microsoft.com/v1.0/me/events/AQMkAGZlO...'
auth = ''
headers = {'Authorization': 'Bearer eyJ0...
data = {}
s = <requests.sessions.Session object at 0x7faafc4e53c0>
exc = JSONDecodeError('Expecting value: line 1 column 1 (char 0)')
File "env/lib/python3.10/site-packages/requests/models.py", line 975, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
self = <Response [202]>
kwargs = {}
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Can I somehow workaround it, for example: Set to the function that empty body is returned and ingore return?
Thanks for any advice.
Jiri Sir