summaryrefslogtreecommitdiffstats
path: root/Http
diff options
context:
space:
mode:
Diffstat (limited to 'Http')
-rw-r--r--Http/Firewall/ExceptionListener.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/Http/Firewall/ExceptionListener.php b/Http/Firewall/ExceptionListener.php
index c757390..46ffde8 100644
--- a/Http/Firewall/ExceptionListener.php
+++ b/Http/Firewall/ExceptionListener.php
@@ -76,6 +76,11 @@ class ExceptionListener
$exception = $event->getException();
$request = $event->getRequest();
+ // determine the actual cause for the exception
+ while (null !== $previous = $exception->getPrevious()) {
+ $exception = $previous;
+ }
+
if ($exception instanceof AuthenticationException) {
if (null !== $this->logger) {
$this->logger->info(sprintf('Authentication exception occurred; redirecting to authentication entry point (%s)', $exception->getMessage()));