policies: show more information when provider fails to resolve application
This commit is contained in:
parent
5c0ec7554b
commit
373793ce9a
|
@ -62,9 +62,11 @@ class PolicyAccessView(AccessMixin, View):
|
|||
return self.handle_no_permission()
|
||||
try:
|
||||
self.resolve_provider_application()
|
||||
except (Application.DoesNotExist, Provider.DoesNotExist):
|
||||
LOGGER.warning("failed to resolve application")
|
||||
return self.handle_no_permission_authenticated()
|
||||
except (Application.DoesNotExist, Provider.DoesNotExist) as exc:
|
||||
LOGGER.warning("failed to resolve application", exc=exc)
|
||||
return self.handle_no_permission_authenticated(
|
||||
PolicyResult(False, _("Failed to resolve application"))
|
||||
)
|
||||
# Check if user is unauthenticated, so we pass the application
|
||||
# for the identification stage
|
||||
if not request.user.is_authenticated:
|
||||
|
|
Reference in New Issue