From 35c1476bbe87f31df63aa862e919e8a6708e1a23 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sun, 1 Aug 2021 12:25:11 +0200 Subject: [PATCH] outposts: catch invalid ServiceConnection error in outpost controller Signed-off-by: Jens Langhammer --- authentik/outposts/tasks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/authentik/outposts/tasks.py b/authentik/outposts/tasks.py index 7bcca0471..da683f8fd 100644 --- a/authentik/outposts/tasks.py +++ b/authentik/outposts/tasks.py @@ -28,6 +28,7 @@ from authentik.outposts.models import ( OutpostServiceConnection, OutpostState, OutpostType, + ServiceConnectionInvalid, ) from authentik.providers.ldap.controllers.docker import LDAPDockerController from authentik.providers.ldap.controllers.kubernetes import LDAPKubernetesController @@ -114,7 +115,7 @@ def outpost_controller( for log in logs: LOGGER.debug(log) LOGGER.debug("-----------------Outpost Controller logs end-------------------") - except ControllerException as exc: + except (ControllerException, ServiceConnectionInvalid) as exc: self.set_status(TaskResult(TaskResultStatus.ERROR).with_error(exc)) else: self.set_status(TaskResult(TaskResultStatus.SUCCESSFUL, logs))