diff --git a/src/Authentication/Provider/DoccheckIpAuth.php b/src/Authentication/Provider/DoccheckIpAuth.php
index 34f1d2c..b05c549 100644
--- a/src/Authentication/Provider/DoccheckIpAuth.php
+++ b/src/Authentication/Provider/DoccheckIpAuth.php
@@ -131,10 +131,10 @@ class DoccheckIpAuth implements AuthenticationProviderInterface {
   /**
    * {@inheritdoc}
    */
-  public function handleException(GetResponseForExceptionEvent $event) {
-    $exception = $event->getException();
+  public function handleException(\Symfony\Component\HttpKernel\Event\ExceptionEvent $event) {
+    $exception = $event->getThrowable();
     if ($exception instanceof AccessDeniedHttpException) {
-      $event->setException(new UnauthorizedHttpException('Invalid IP.', $exception));
+      $event->setThrowable(new UnauthorizedHttpException('Invalid IP.', $exception));
       return TRUE;
     }
     return FALSE;
