events: prevent error when request fails without response
closes #4589 Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
parent
dbd324f202
commit
ffc97905f3
|
@ -361,7 +361,9 @@ class NotificationTransport(SerializerModel):
|
||||||
)
|
)
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
except RequestException as exc:
|
except RequestException as exc:
|
||||||
raise NotificationTransportError(exc.response.text) from exc
|
raise NotificationTransportError(
|
||||||
|
exc.response.text if exc.response else str(exc)
|
||||||
|
) from exc
|
||||||
return [
|
return [
|
||||||
response.status_code,
|
response.status_code,
|
||||||
response.text,
|
response.text,
|
||||||
|
|
Reference in New Issue