flows: fix FlowNonApplicableException not being Sentry Ignored
This commit is contained in:
		| @ -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.""" | ||||
|  | ||||
| @ -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) | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Jens Langhammer
					Jens Langhammer