Fix SyncWebhook exception case causing attribute errors
This commit is contained in:
parent
02e21a8905
commit
60c1240849
@ -156,6 +156,9 @@ class WebhookAdapter:
|
|||||||
response.status_code,
|
response.status_code,
|
||||||
)
|
)
|
||||||
response.encoding = 'utf-8'
|
response.encoding = 'utf-8'
|
||||||
|
# Compatibility with aiohttp
|
||||||
|
response.status = response.status_code # type: ignore
|
||||||
|
|
||||||
data = response.text or None
|
data = response.text or None
|
||||||
if data and response.headers['Content-Type'] == 'application/json':
|
if data and response.headers['Content-Type'] == 'application/json':
|
||||||
data = json.loads(data)
|
data = json.loads(data)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user