diff --git a/authentik/events/models.py b/authentik/events/models.py index d84f73dc3..53b9dd8e3 100644 --- a/authentik/events/models.py +++ b/authentik/events/models.py @@ -361,7 +361,9 @@ class NotificationTransport(SerializerModel): ) response.raise_for_status() 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 [ response.status_code, response.text,