blueprint: fix EntryInvalidError not being handled in tasks

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2022-08-31 23:08:38 +02:00
parent 14a7c9f967
commit 398eb23d31

View file

@ -18,7 +18,7 @@ from authentik.blueprints.models import (
BlueprintInstanceStatus,
BlueprintRetrievalFailed,
)
from authentik.blueprints.v1.common import BlueprintLoader, BlueprintMetadata
from authentik.blueprints.v1.common import BlueprintLoader, BlueprintMetadata, EntryInvalidError
from authentik.blueprints.v1.importer import Importer
from authentik.blueprints.v1.labels import LABEL_AUTHENTIK_INSTANTIATE
from authentik.events.monitored_tasks import (
@ -168,6 +168,7 @@ def apply_blueprint(self: MonitoredTask, instance_pk: str):
InternalError,
IOError,
BlueprintRetrievalFailed,
EntryInvalidError,
) as exc:
instance.status = BlueprintInstanceStatus.ERROR
self.set_status(TaskResult(TaskResultStatus.ERROR).with_error(exc))