diff --git a/authentik/flows/exceptions.py b/authentik/flows/exceptions.py index 47072264c..fd1ddddad 100644 --- a/authentik/flows/exceptions.py +++ b/authentik/flows/exceptions.py @@ -1,9 +1,11 @@ """flow exceptions""" +from authentik.lib.sentry import SentryIgnoredException -class FlowNonApplicableException(BaseException): + +class FlowNonApplicableException(SentryIgnoredException): """Flow does not apply to current user (denied by policy).""" -class EmptyFlowException(BaseException): +class EmptyFlowException(SentryIgnoredException): """Flow has no stages.""" diff --git a/authentik/flows/planner.py b/authentik/flows/planner.py index 8105051e6..2c82f5dc8 100644 --- a/authentik/flows/planner.py +++ b/authentik/flows/planner.py @@ -120,7 +120,7 @@ class FlowPlanner: engine.build() result = engine.result if not result.passing: - raise FlowNonApplicableException(result.messages) + raise FlowNonApplicableException(",".join(result.messages)) # User is passing so far, check if we have a cached plan cached_plan_key = cache_key(self.flow, user) cached_plan = cache.get(cached_plan_key, None)