diff --git a/src/LoginDestinationManager.php b/src/LoginDestinationManager.php
index 48006e2ec..e53e8555c 100644
--- a/src/LoginDestinationManager.php
+++ b/src/LoginDestinationManager.php
@@ -116,7 +116,13 @@ public function findDestination($trigger, AccountInterface $account) {
     uasort($destinations, '\Drupal\login_destination\Entity\LoginDestination::sort');
 
     $path = $this->getCurrentPath();
-    $path_alias = mb_strtolower($this->aliasManager->getAliasByPath($path));
+    try {
+      $path_alias = mb_strtolower($this->aliasManager->getAliasByPath($path));
+    }
+    catch (\InvalidArgumentException $e) {
+      // Cannot match invalid paths.
+      $path_alias = NULL;
+    }
 
     // Get user roles.
     $user_roles = $account->getRoles();
