events: fix error when slack notification request failed without a response
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
ec254d5927
commit
3c0cc27ea1
|
@ -313,7 +313,8 @@ class NotificationTransport(models.Model):
|
||||||
response = post(self.webhook_url, json=body)
|
response = post(self.webhook_url, json=body)
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
except RequestException as exc:
|
except RequestException as exc:
|
||||||
raise NotificationTransportError(exc.response.text) from exc
|
text = exc.response.text if exc.response else str(exc)
|
||||||
|
raise NotificationTransportError(text) from exc
|
||||||
return [
|
return [
|
||||||
response.status_code,
|
response.status_code,
|
||||||
response.text,
|
response.text,
|
||||||
|
|
Reference in a new issue