diff --git a/authentik/tasks/models.py b/authentik/tasks/models.py index 1926cb2b2a50..faea9d0ca7fd 100644 --- a/authentik/tasks/models.py +++ b/authentik/tasks/models.py @@ -2,6 +2,7 @@ from typing import Self from uuid import UUID, uuid4 +from dramatiq.errors import Retry import pgtrigger from django.contrib.contenttypes.fields import ContentType, GenericForeignKey, GenericRelation from django.db import models @@ -107,6 +108,8 @@ def _make_log( **attributes, } message = str(message) + if not message and isinstance(message, Retry): + message = "Task has encountered an error and will be retried" return LogEvent( message, logger=logger,