diff --git a/Model/TokenConfig.php b/Model/TokenConfig.php
index <HASH>..<HASH> 100644
--- a/Model/TokenConfig.php
+++ b/Model/TokenConfig.php
@@ -51,6 +51,10 @@ class TokenConfig
             return $this->defaultKey;
         }
 
+        if (!isset($this->tokens[$key])) {
+            throw new \LogicException(sprintf('Token with name %s could not be found', $key));
+        }
+
         return $key;
     }
Added exception if token name is not defiend